Cast all arguments for Kernel#exec to string.

In the FFMPEG formula the revision number is represented as an integer,
this ends up as an argument to Kernel#exec and it doesn't really like
that. The fix is to cast all arguments to a string.

Fixes Homebrew/homebrew#171.
This commit is contained in:
Manfred Stienstra 2009-12-03 19:25:08 +01:00 committed by Max Howell
parent 965b0c8da7
commit 5ff55b1739

View File

@ -88,7 +88,7 @@ end
def safe_system cmd, *args
puts "#{cmd} #{args*' '}" if ARGV.verbose?
fork do
exec(cmd, *args) rescue nil
exec(cmd, *args.map(&:to_s)) rescue nil
exit! 1 # never gets here unless exec failed
end
Process.wait