aboutsummaryrefslogtreecommitdiffstats
path: root/bin
diff options
context:
space:
mode:
authorMax Howell2009-09-10 14:29:41 +0100
committerMax Howell2009-09-10 19:23:03 +0100
commita793e3040513f72a5108944a8c3ee1cbfb37ebb2 (patch)
tree4b35d76ea59b05799377aa4dca18bf32e759da0a /bin
parentfdaa267fb92e1652865083e1be11db06e8c94361 (diff)
downloadbrew-a793e3040513f72a5108944a8c3ee1cbfb37ebb2.tar.bz2
Only allow --interactive with one formula argument
See comments in commit for details.
Diffstat (limited to 'bin')
-rwxr-xr-xbin/brew9
1 files changed, 9 insertions, 0 deletions
diff --git a/bin/brew b/bin/brew
index b09c957b8..bf3a449c2 100755
--- a/bin/brew
+++ b/bin/brew
@@ -90,6 +90,15 @@ begin
puts "#{f}: #{ENV[f]}" unless ENV[f].to_s.empty?
end
end
+
+ if ARGV.interactive? and ARGV.formulae.count > 1
+ # the reason for this is interactive mode is a little tricky to do
+ # with more than one formula, AND I can't think of a time where you'd
+ # want to do it anyway. If someone comes up with a legitimate use for
+ # this we will adapt the code. "But I might want it!" is not a
+ # legitimate use!
+ raise "Interactive mode can only be used with one formula argument"
+ end
unless ARGV.force?
unless system "which #{ENV['CC'] or 'cc'} &> /dev/null" and $?.success?