diff --git a/Library/Homebrew/exceptions.rb b/Library/Homebrew/exceptions.rb index ce13a1a24d..8100e57c08 100644 --- a/Library/Homebrew/exceptions.rb +++ b/Library/Homebrew/exceptions.rb @@ -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