diff options
| author | Misty De Meo | 2012-06-17 18:44:35 -0500 |
|---|---|---|
| committer | Misty De Meo | 2012-07-09 12:01:09 -0500 |
| commit | f17429f842222428d31095e0f604681764824afa (patch) | |
| tree | 8776ae87ac223b16cd6ab40650bb1405d1cc16e7 /Library/Homebrew/extend | |
| parent | 743b5e6feb05c92cfea49f89bc946ea1420b80fe (diff) | |
| download | brew-f17429f842222428d31095e0f604681764824afa.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 Homebrew/homebrew#12898.
Signed-off-by: Misty De Meo <mistydemeo@gmail.com>
Diffstat (limited to 'Library/Homebrew/extend')
| -rw-r--r-- | Library/Homebrew/extend/ARGV.rb | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/Library/Homebrew/extend/ARGV.rb b/Library/Homebrew/extend/ARGV.rb index 8d5ad3199..70d8f6daa 100644 --- a/Library/Homebrew/extend/ARGV.rb +++ b/Library/Homebrew/extend/ARGV.rb @@ -87,6 +87,9 @@ module HomebrewArgvExtension def one? flag? '--1' end + def dry_run? + include?('--dry-run') || switch?('n') + end def build_head? include? '--HEAD' |
