diff options
| author | Max Howell | 2009-09-10 14:29:41 +0100 |
|---|---|---|
| committer | Max Howell | 2009-09-10 19:23:03 +0100 |
| commit | a793e3040513f72a5108944a8c3ee1cbfb37ebb2 (patch) | |
| tree | 4b35d76ea59b05799377aa4dca18bf32e759da0a /bin | |
| parent | fdaa267fb92e1652865083e1be11db06e8c94361 (diff) | |
| download | brew-a793e3040513f72a5108944a8c3ee1cbfb37ebb2.tar.bz2 | |
Only allow --interactive with one formula argument
See comments in commit for details.
Diffstat (limited to 'bin')
| -rwxr-xr-x | bin/brew | 9 |
1 files changed, 9 insertions, 0 deletions
@@ -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? |
