Skip to content

Commit

Permalink
stringify facts, if required, before collecting custom facts
Browse files Browse the repository at this point in the history
  • Loading branch information
bastelfreak committed May 24, 2024
1 parent fd60000 commit c30a3d6
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions lib/rspec-puppet-facts.rb
Original file line number Diff line number Diff line change
Expand Up @@ -170,11 +170,10 @@ def on_supported_os_implementation(opts = {})
os = "#{facts[:operatingsystem].downcase}-#{operatingsystemmajrelease}-#{facts[:hardwaremodel]}"
next unless os.start_with? RspecPuppetFacts.spec_facts_os_filter if RspecPuppetFacts.spec_facts_os_filter
facts.merge! RspecPuppetFacts.common_facts
facts = stringify_keys(facts) if RSpec.configuration.facterdb_string_keys
os_facts_hash[os] = RspecPuppetFacts.with_custom_facts(os, facts)
end

return stringify_keys(os_facts_hash) if RSpec.configuration.facterdb_string_keys

os_facts_hash
end

Expand Down

0 comments on commit c30a3d6

Please sign in to comment.