Project

General

Profile

« Previous | Next » 

Revision 6eec5766

Added by Michael Moll over 4 years ago

Fixes #29117 - Fix Style/SpecialGlobalVars cop

View differences:

lib/proxy/util.rb
require 'English'
require 'open3'
require 'shellwords'
require 'base64'
......
# In Ruby >= 1.9, call thr.value to wait for a Process::Status object.
status = thr.value unless thr.nil?
end
status ? status.exitstatus : $?
status ? status.exitstatus : $CHILD_STATUS
ensure
yield if block_given?
end
......
logger.error "Error when executing '#{cmd}'", e
return false
end
logger.warn("Non-null exit code when executing '#{cmd}'") if $?.exitstatus != 0
$?.exitstatus == 0
logger.warn("Non-null exit code when executing '#{cmd}'") if $CHILD_STATUS.exitstatus != 0
$CHILD_STATUS.exitstatus == 0
end
def popen(cmd)

Also available in: Unified diff