Skip to content

Commit

Permalink
(maint) Fix fact collection script on Windows
Browse files Browse the repository at this point in the history
Previously we were directly shelling out to cygwin on Windows boxes,
causing the facter command to fail with:

    bash: facter: command not found

Fortunately, there's a helper `facter` method that properly namespaces
the executable for the target platform.
  • Loading branch information
GabrielNagy committed Jan 17, 2022
1 parent f684b54 commit ca8951a
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion acceptance/util/puppet_facts_output.rb
Original file line number Diff line number Diff line change
Expand Up @@ -132,7 +132,7 @@ def filename_from_facts(facts)
end

agents.each do |agent|
on agent, "facter --show-legacy -p -j", :acceptable_exit_codes => [0] do
on agent, facter('--show-legacy -p -j'), :acceptable_exit_codes => [0] do
facts = JSON.parse(stdout)
facter_major_version = facts['facterversion']
primary_network = facts['networking']['primary']
Expand Down

0 comments on commit ca8951a

Please sign in to comment.