Merge pull request #5267 from fxcoudert/testfailure

exceptions.rb: avoid failure if no arguments
This commit is contained in:
FX Coudert 2018-11-07 16:46:31 +01:00 committed by GitHub
commit fd8206567b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -360,8 +360,8 @@ class BuildError < RuntimeError
@cmd = cmd
@args = args
@env = env
pretty_args = args.map { |arg| arg.to_s.gsub " ", "\\ " }.join(" ")
super "Failed executing: #{cmd} #{pretty_args}"
pretty_args = Array(args).map { |arg| arg.to_s.gsub " ", "\\ " }.join(" ")
super "Failed executing: #{cmd} #{pretty_args}".strip
end
def issues