aboutsummaryrefslogtreecommitdiffstats
path: root/Library/Homebrew/cmd/link.rb
diff options
context:
space:
mode:
authorMisty De Meo2012-06-17 18:44:35 -0500
committerMisty De Meo2012-07-09 12:01:09 -0500
commitc3285f69b0bf82b53c10e7e84c85edcf2a7ef37e (patch)
tree2bf6e6e098adbadd3f7077aa85fb9048583506bf /Library/Homebrew/cmd/link.rb
parentbf051054b621109aa4e064ec4045f4ce0e521066 (diff)
downloadhomebrew-c3285f69b0bf82b53c10e7e84c85edcf2a7ef37e.tar.bz2
ARGV: add .dry_run? method
Add an ARGV.dry_run? helper method for '--dry-run'/'-n' now that '-n' is being used as a git-style dry-run in two commands. Closes #12898. Signed-off-by: Misty De Meo <mistydemeo@gmail.com>
Diffstat (limited to 'Library/Homebrew/cmd/link.rb')
-rw-r--r--Library/Homebrew/cmd/link.rb9
1 files changed, 3 insertions, 6 deletions
diff --git a/Library/Homebrew/cmd/link.rb b/Library/Homebrew/cmd/link.rb
index c5e34fe2c..604c12e0f 100644
--- a/Library/Homebrew/cmd/link.rb
+++ b/Library/Homebrew/cmd/link.rb
@@ -9,12 +9,9 @@ module Homebrew extend self
abort "Cowardly refusing to `sudo brew link'"
end
- if ARGV.force?
- mode = :force
- elsif ARGV.include?("--dry-run") || ARGV.include?("-n")
- mode = :dryrun
- else
- mode = nil
+ if ARGV.force? then mode = :force
+ elsif ARGV.dry_run? then mode = :dryrun
+ else mode = nil
end
ARGV.kegs.each do |keg|