188 Commits

Author SHA1 Message Date
Zach Auten
ecc7b9e174 cask_reason will suggest brew cask uninstall 2019-07-31 00:31:12 -04:00
Misty De Meo
5ab34abd17
Bottles: allow skipping or_later tags
This is a developer-only feature, so it's gated via `HOMEBREW_DEVELOPER`.
This is intended to enable testing of macOS 10.15; users building software
manually to test compatibility of early betas need to be able to build
software from source instead of via pouring 10.14 bottles. This isn't
intended to be a general-purpose `HOMEBREW_BUILD_FROM_SOURCE` replacement,
and has no effect on released versions of macOS.
2019-06-06 10:14:10 -07:00
Mike McQuaid
cd40af2c58
ARGV: fix build_head? call.
Fixes #6087.
2019-05-02 08:16:55 +01:00
Mike McQuaid
36dbad3922
Add frozen_string_literal to all files. 2019-04-20 13:27:36 +09:00
Mike McQuaid
18630c7032
extend/ARGV: remove unused methods. 2019-04-17 21:08:26 +09:00
Mike McQuaid
cee75b6af2
ARGV: freeze when using CLI::Parser.
Otherwise `Homebrew.args` values may not match those of modified `ARGV`.
2019-02-18 16:56:43 +00:00
Mike McQuaid
eed1444d61
Update deprecations and cleanup
- Move `odeprecated` to `odisabled`
- Remove `odisabled`
- Enable automatic cleanup on install/reinstall/upgrade.
2019-01-23 21:57:40 +00:00
Mike McQuaid
e1eb4710e4
extend/ARGV: don't warn on --build-arch=.
Fixes #5504.
2019-01-08 19:24:00 +00:00
EricFromCanada
20167e5f1b Adjust comments to tidy API docs output. 2018-10-18 21:42:43 -04:00
Markus Reiter
e9b9ea49a1 Update to RuboCop 0.59.1. 2018-09-17 03:45:59 +02:00
Markus Reiter
3a0a9f9073 Add String#delete_prefix backport. 2018-09-16 20:07:34 +02:00
Markus Reiter
769d89dead Resolve formulae in brew cleanup. 2018-09-11 17:44:39 +02:00
Mike McQuaid
80d75bc0d8
Homebrew/.rubocop: tweak rules.
Adjust the rules based on the current codebase. Remove various enable,
disables and default values that are unnecessary. Add more comments
explaining why. Make minor changes needed to enable a few more rules.
2018-09-02 20:15:09 +01:00
Mike McQuaid
6417332a3a Change Mojave bottle behaviour
Rather than relying on a `HOMEBREW_FORCE_BOTTLE` variable (which ends
up doing silly things like forcing bottle usage even when options are
provided) instead handle this at the `or_later` bottle detection
level so on prerelease versions of macOS any bottle looks like an
`or_later` bottle (unless various environment variables are set).

Fixes issues noted in:
https://github.com/Homebrew/brew/pull/4520#issuecomment-407229605
2018-07-24 09:25:32 +01:00
Mike McQuaid
3e93d4c6cf Add HOMEBREW_FORCE_BOTTLE variable
This does the equivalent of always passing `--force-bottle`. This will
be enabled by default on Mojave to allow people to avoid building
everything from source until our porting and bottling is a bit further
along.
2018-07-20 14:28:14 +01:00
Andrew Janke
0a2d8c3d4d Add --display-times option to install, reinstall, and upgrade 2018-07-14 11:06:03 -04:00
Gautham Goli
164f47a108 irb: Use Parser to parse args 2018-03-24 22:18:50 +05:30
Mike McQuaid
82e82b7fbc install: add --include-test option.
Allow at `install` (or `install --only-dependencies`) time to specify
that test dependencies should be installed. This will allow simplifying
code in `brew test-bot`.

This could also be made an environment variable if desired by
maintainers.
2018-03-15 13:37:34 +00:00
Mike McQuaid
2205f62ec6 irb: add pry support.
Make `brew irb` optionally support `pry`. While doing so, also make it a `dev-cmd`.
2018-02-28 11:36:23 +00:00
Markus Reiter
9bee9ca575 Use “squiggly” heredocs. 2017-10-18 14:39:09 +02:00
Mike McQuaid
01e9ec9a9f Rubocop: automatic rule fixes. 2017-09-24 21:23:59 +01:00
Josh Soref
44c56cd9a8 spelling: separated 2017-09-10 16:42:10 +00:00
Markus Reiter
2d6ae61314 Re-revert "Fix operator spacing." 2017-06-02 19:22:05 +02:00
ilovezfs
197392b56d Revert "Fix operator spacing." 2017-06-01 04:06:40 -07:00
Markus Reiter
d34ba7395b Fix operator spacing. 2017-05-31 19:53:41 +02:00
Uladzislau Shablinski
84fbcdc913 Merge pull request #2183 from vladshablinsky/questions_mean_bool
ARGV.include? should return boolean
2017-02-28 02:55:40 +03:00
Uladzislau Shablinski
be8a0b3299 ARGV.include? should return boolean 2017-02-26 13:36:20 +03:00
JCount
e84b3eaf48 ARGV: add missing "--force" arg to formula_install_option_names 2017-02-18 23:37:37 -05:00
Mike McQuaid
82f4413964 formula, ARGV: don't output duplicate formulae.
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-31 17:03:29 +00:00
Mike McQuaid
f98304026b Deprecate 32-bit options.
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-12-20 10:22:30 +00:00
Mike McQuaid
cc3bf7bcb5 Don't warn about unused brew install arguments.
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-11-14 09:28:28 +00:00
Alyssa Ross
c4c855b9fc ARGV: extract #values from missing 2016-10-25 22:36:13 +01:00
Josh Hagins
c7e6613f7b tap_constants: rename HOMEBREW_CASK_TAP_FORMULA_REGEX
New name is HOMEBREW_CASK_TAP_CASK_REGEX
2016-10-23 21:48:11 -04:00
Zhiming Wang
9b9e9eb8dd
ARGV: kegs: error on empty arguments
Fixes #1138.
2016-09-25 11:33:56 -04:00
Markus Reiter
6c6a4c9fa7 RuboCop: Style/AccessorMethodName 2016-09-24 19:28:26 +02:00
Markus Reiter
58e36c7319 Fix Style/GuardClause. 2016-09-24 12:24:35 +02:00
Markus Reiter
23eac7ab89 Fix DoubleNegation. 2016-09-23 15:30:06 +02:00
Alyssa Ross
2a683f2569 upgrade, outdated: follow alias changes 2016-09-18 19:58:09 +01:00
Mike McQuaid
72d10fff0b Use constants for LinkedKegs/PinnedKegs/Locks.
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-15 18:28:42 +01:00
Mike McQuaid
17a7c23881 extend/ARGV: fix Rubocop warnings. 2016-09-13 07:56:57 +01:00
Vlad Shablinsky
9754dbada8
Update upgrade/outdated methods for head versions
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-06 21:25:56 +08:00
Uladzislau Shablinski
63c563f970 Fix update commit for non-HEAD kegs with head spec (#644)
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-08-06 16:22:12 +08:00
Uladzislau Shablinski
092d4712a1 Update commit when resolving the formula (#536) 2016-07-17 16:56:13 +08:00
Martin Afanasjew
2633f888d4 extend/ARGV: avoid assignment in argument list
Aside from being bad style, this also assigns to an unused variable.
2016-07-17 02:31:07 +02:00
Xu Cheng
7e14ec0ba6
ARGV#kegs: using installed_prefix to locate keg 2016-07-17 02:23:37 +08:00
Xu Cheng
f811a45fe4
ARGV#resolved_formulae: check whether input is a formula file 2016-07-17 02:23:37 +08:00
Xu Cheng
7452dcf508
ARGV#resolved_formulae: also load build options 2016-07-15 19:57:23 +08:00
Martin Afanasjew
1087df1016 ARGV: fix 'value' method, make it more predictable
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-12 08:09:19 +02:00
Andrew Janke
d887dd39ec brew install: make -s apply only to given formula, not deps (#205) 2016-05-06 12:02:13 -07:00
Andrew Janke
acc9a7ca85 brew test, install, update-test: add --keep-tmp option
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-18 12:23:08 -04:00