Details
-
Bug
-
Status: Closed
-
Normal
-
Resolution: Fixed
-
FACT 3.0.0
-
None
-
3
-
Client 2016-01-13, Client 2016-04-20, Client 2016-05-04
-
Bug Fix
-
Facter::Util::Resolution.exec will now set the Ruby $? exit status variable
Description
The following worked with Facter 2, but produces an error in Facter 3.
Facter.add("foo") do
|
setcode do
|
Facter::Util::Resolution.exec('echo hello')
|
$?.exitstatus == 0
|
end
|
end
|
Output is
2015-12-12 12:04:56.346097 ERROR puppetlabs.facter - error while resolving custom fact "foo": undefined method `exitstatus' for nil:NilClass
|
Facter::Util::Resolution.exec no longer sets $? to a Ruby Process::Status object.