Skip to content

Commit

Permalink
Merge pull request #177 from bastelfreak/cleanup
Browse files Browse the repository at this point in the history
replace chained unless&if logic to make it more readable
  • Loading branch information
bastelfreak committed Jun 8, 2024
2 parents fd60000 + 85dc76a commit 52df3df
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/rspec-puppet-facts.rb
Original file line number Diff line number Diff line change
Expand Up @@ -168,7 +168,7 @@ def on_supported_os_implementation(opts = {})
end
end
os = "#{facts[:operatingsystem].downcase}-#{operatingsystemmajrelease}-#{facts[:hardwaremodel]}"
next unless os.start_with? RspecPuppetFacts.spec_facts_os_filter if RspecPuppetFacts.spec_facts_os_filter
next if RspecPuppetFacts.spec_facts_os_filter && !os.start_with?(RspecPuppetFacts.spec_facts_os_filter)
facts.merge! RspecPuppetFacts.common_facts
os_facts_hash[os] = RspecPuppetFacts.with_custom_facts(os, facts)
end
Expand Down

0 comments on commit 52df3df

Please sign in to comment.