aboutsummaryrefslogtreecommitdiffstats
path: root/Library/Homebrew/extend/ARGV.rb
AgeCommit message (Collapse)Author
2017-06-02Re-revert "Fix operator spacing."Markus Reiter
2017-06-01Revert "Fix operator spacing."ilovezfs
2017-05-31Fix operator spacing.Markus Reiter
2017-02-28Merge pull request #2183 from vladshablinsky/questions_mean_boolUladzislau Shablinski
ARGV.include? should return boolean
2017-02-26ARGV.include? should return booleanUladzislau Shablinski
2017-02-18ARGV: add missing "--force" arg to formula_install_option_namesJCount
2016-12-31formula, ARGV: don't output duplicate formulae.Mike McQuaid
If you specify a formula more than once or it exists in the Cellar with an alias name and the main name (e.g. `qt` and `qt5`) you can see the same formula showing up more than once. Instead, resolve these output lists of formulae such that they are unique based on their `name`. This doesn't use `full_name` as it's `name` that's use for the `Cellar`.
2016-12-20Deprecate 32-bit options.Mike McQuaid
These were formerly supported but as it has been a very long time since 32-bit software was necessary on macOS these have been deprecated with a `brew audit` warning and a future `odeprecated`.
2016-11-14Don't warn about unused `brew install` arguments.Mike McQuaid
This is a step closer to better argument handling but for now just fixes the issue in #1217 where it starts complaining about options like `--build-from-source` being used.
2016-10-25ARGV: extract #values from missingAlyssa Ross
2016-10-23tap_constants: rename HOMEBREW_CASK_TAP_FORMULA_REGEXJosh Hagins
New name is HOMEBREW_CASK_TAP_CASK_REGEX
2016-09-25ARGV: kegs: error on empty argumentsZhiming Wang
Fixes #1138.
2016-09-24RuboCop: Style/AccessorMethodNameMarkus Reiter
2016-09-24Fix Style/GuardClause.Markus Reiter
2016-09-23Fix DoubleNegation.Markus Reiter
2016-09-18upgrade, outdated: follow alias changesAlyssa Ross
2016-09-15Use constants for LinkedKegs/PinnedKegs/Locks.Mike McQuaid
These definitions are scattered throughout the codebase which makes it hard to refactor them later (my goal is to move them outside of HOMEBREW_LIBRARY). Unify their definitions for clearer code and easier movement later.
2016-09-13extend/ARGV: fix Rubocop warnings.Mike McQuaid
2016-08-06Update upgrade/outdated methods for head versionsVlad Shablinsky
Introduce `--fetch-HEAD` option. Without this option upgrade and outdated never fetch latest upstream commit to detect if HEAD is outdated -- tabs are used instead. However, if option is passed, we fetch commit from upstream, which is more time consuming, but we can be sure that version is up-to-date or outdated.
2016-08-06Fix update commit for non-HEAD kegs with head spec (#644)Uladzislau Shablinski
If we try to call `Formulary.from_keg(f, :head)` on the keg that is not HEAD-keg itself, we don't need to update commit of returned formula and should use just HEAD version with nil commit. Same is true for `ARGV.resolved_formulae`
2016-07-17Update commit when resolving the formula (#536)Uladzislau Shablinski
2016-07-17extend/ARGV: avoid assignment in argument listMartin Afanasjew
Aside from being bad style, this also assigns to an unused variable.
2016-07-17ARGV#kegs: using installed_prefix to locate kegXu Cheng
2016-07-17ARGV#resolved_formulae: check whether input is a formula fileXu Cheng
2016-07-15ARGV#resolved_formulae: also load build optionsXu Cheng
2016-05-12ARGV: fix 'value' method, make it more predictableMartin Afanasjew
The fix changes behavior in same cases, but those cases were all either broken or showed unexpected behavior. The new behavior is very simple: - If an argument starts with `--<option-name>=`, return whatever comes after the equals sign. Prior to this change, `ARGV.value` showed some unexpected behavior: - `ARGV.value("foo")` returned `nil` for `--foo=` because at least one character needed to be present after the equals sign. (All other option parser implementations I'm aware of allow for empty values.) - `ARGV.value("bar")` returned `"baz"` for `--foo=--bar=baz` because the regular expression was not anchored to the start of the argument. - `ARGV.value("++")` raised an exception because the string wasn't escaped for use in the regular expression. (An unlikely corner case.) Closes #231. Signed-off-by: Martin Afanasjew <martin@afanasjew.de>
2016-05-06brew install: make -s apply only to given formula, not deps (#205)Andrew Janke
2016-04-18brew test, install, update-test: add --keep-tmp optionAndrew Janke
Also enables sandbox for --interactive and --debug use of install and test, using automatic retention. Closes #66. Signed-off-by: Andrew Janke <andrew@apjanke.net>
2016-04-18ARGV: remove unused 'usage' methodMartin Afanasjew
Also remove related helper method `Homebrew.help_s`.
2016-02-26ARGV: switch? should only has one dashXu Cheng
If user inputs argument such as `-with-flag`, we can assume it's a bad flag. Closes Homebrew/homebrew#49256 Closes Homebrew/homebrew#49550. Signed-off-by: Xu Cheng <xucheng@me.com>
2016-02-11ARGV: stop supporting --homebrew-developer optionMartin Afanasjew
Homebrew developers have the corresponding variable permanently set in their environment and wanting to appear like a Homebrew developer for a single invocation is exceedingly rare. Additionally, the option won't be recognized by `bin/brew`. (It is also undocumented.) Using `HOMEBREW_DEVELOPER=1 brew <command>` is still possible, and not more inconvenient than passing the `--homebrew-developer` option. Closes Homebrew/homebrew#48322. Signed-off-by: Martin Afanasjew <martin@afanasjew.de>
2015-11-10ARGV: add explicit option for disabling sandbox.Mike McQuaid
2015-08-22core file style updateXu Cheng
2015-08-21Merge bottle install without Xcode branchMisty De Meo
Merge branch 'bottle_hooks'
2015-08-21Add no-Xcode documentation for all classes, methodsWilliam Woodruff
2015-08-21Install: add BuildToolsError and BuildFlagsErrorWilliam Woodruff
Add these new errors, and guards in formula installation and cmd/{,un,re}install to match, move can_build? to the MacOS module, flatten conditions, remove redundant can_build? check reinstate removed (doctor) check
2015-08-10ARGV#resolved_formula: use to_rackXu Cheng
2015-08-10don't use new name rack if old name rack is a dirVlad Shablinsky
Everything that used HOMEBREW_CELLAR/canonical_name could point to something that doesn't exist because loader_for tries to load new name formula if no old name found. However there can be software installed from path with the same name that renamed formulae had and we still need to link/unlink/uninstall etc that software. The solution is Formulary#to_rack method that returns rack for given name. - Add Formulary#to_rack - Update ARGV.kegs - Update cmd/switch
2015-08-10implement formulary#find_with_priorityCNA-Bld
2015-08-09ARGV#resolved_formulae: use canonical_name to locate rackXu Cheng
Closes Homebrew/homebrew#42537. Signed-off-by: Xu Cheng <xucheng@me.com>
2015-08-05ARGV: don't downcase bottle filenamesMisty De Meo
Fixes Homebrew/homebrew#42470.
2015-08-03Core files style updates.BrewTestBot
Closes Homebrew/homebrew#42354. Signed-off-by: Mike McQuaid <mike@mikemcquaid.com>
2015-07-31ARGV#resolved_formulae: auto resolve specXu Cheng
2015-07-31ARGV#spec: allow pass default valueXu Cheng
2015-05-27ARGV#kegs: try to load fomrula from rackXu Cheng
2015-05-27ARGV: add resolved_formulae methodXu Cheng
2015-04-09preliminary write control only sandboxXu Cheng
Closes Homebrew/homebrew#38361. Signed-off-by: Xu Cheng <xucheng@me.com>
2014-11-30Allow searching/installing Homebrew Casks.Mike McQuaid
People want to install things like GIMP using Homebrew so let's make it easier for them to find a decent installation method. Closes Homebrew/homebrew#34496. Signed-off-by: Mike McQuaid <mike@mikemcquaid.com>
2014-11-03Add ARGV.git?Jack Nagel
2014-08-29Add a method for retrieving only flags from ARGVJack Nagel