diff options
Diffstat (limited to 'lib/puppet/application')
| -rw-r--r-- | lib/puppet/application/describe.rb | 2 | ||||
| -rw-r--r-- | lib/puppet/application/kick.rb | 8 |
2 files changed, 5 insertions, 5 deletions
diff --git a/lib/puppet/application/describe.rb b/lib/puppet/application/describe.rb index f9c5260ec..b9c05c0e5 100644 --- a/lib/puppet/application/describe.rb +++ b/lib/puppet/application/describe.rb @@ -19,7 +19,7 @@ class Formatter while work.length > textLen if work =~ patt res << $1 - work.slice!(0, $&.length) + work.slice!(0, $MATCH.length) else res << work.slice!(0, textLen) end diff --git a/lib/puppet/application/kick.rb b/lib/puppet/application/kick.rb index 8c168b3ba..e6cbed6c8 100644 --- a/lib/puppet/application/kick.rb +++ b/lib/puppet/application/kick.rb @@ -77,12 +77,12 @@ class Puppet::Application::Kick < Puppet::Application # Remove our host from the list of children, so the parallelization # continues working. @children.delete(pid) - if $?.exitstatus != 0 + if $CHILD_STATUS.exitstatus != 0 failures << host end - print "%s finished with exit code %s\n" % [host, $?.exitstatus] + print "%s finished with exit code %s\n" % [host, $CHILD_STATUS.exitstatus] else - $stderr.puts "Could not find host for PID %s with status %s" % [pid, $?.exitstatus] + $stderr.puts "Could not find host for PID %s with status %s" % [pid, $CHILD_STATUS.exitstatus] end rescue Errno::ECHILD # There are no children left, so just exit unless there are still @@ -104,7 +104,7 @@ class Puppet::Application::Kick < Puppet::Application def run_for_host(host) if options[:ping] out = %x{ping -c 1 #{host}} - unless $? == 0 + unless $CHILD_STATUS == 0 $stderr.print "Could not contact %s\n" % host next end |
