instance method
MakeMakefile#xsystem
xsystem(command, werror: false) → true or false
lib/mkmf.rb
View on GitHub ↗
# File tmp/rubies/ruby-4.0.0/lib/mkmf.rb, line 438
def xsystem(command, werror: false)
env, command = expand_command(command)
Logging::open do
puts [env_quote(env), command.quote].join(' ')
if werror
result = nil
Logging.postpone do |log|
output = IO.popen(env, command, &:read)
result = ($?.success? and File.zero?(log.path))
output
end
result
else
system(env, *command)
end
end
end
Executes command with expanding variables, and returns the exit status like as Kernel#system. If werror is true and the error output is not empty, returns false. The output will logged.