254 Commits

Author SHA1 Message Date
Markus Reiter
8a1f8ab858 Pass args to FormulaInstaller instead of using global args. 2020-07-25 04:21:21 +02:00
Mike McQuaid
2c133a3d45
Check installed dependents on install and reinstall
It's not sufficient to do this merely on `brew upgrade` because
`brew install` and `brew reinstall` can also result in formulae being
upgraded.

This requires moving logic from `cmd/upgrade.rb` to `upgrade.rb`. To
save you searching the diff the changes that resulted from doing that:

- Query the installed formulae from class state in `FormulaInstaller`
  rather than the (incomplete) list that we passed into it.
- Don't output the "Checking dependents" message. It was there for
  systems and configurations where this is slow but for most users
  and most installations this will be a (annoying, noisy) no-op.

Fixes https://github.com/Homebrew/brew/issues/7860
2020-07-02 12:53:52 +01:00
Michka Popoff
6eb80c67a4 install: add backtrace on failure
The error message might be useless alone
2020-06-27 09:59:56 +02:00
Mike McQuaid
11cf77be17
formula_installer: prelude before fetch.
This ensures that dependencies are verified and tapped before they are
fetched. `FormulaInstaller#lock` has been moved into
`FormulaInstaller#install` to avoid locking until necessary.

While we're here, don't compute dependencies before fetching if we're
not going to use them.
2020-05-23 13:40:13 +01:00
Mike McQuaid
08a9f0e1c0
Use FormulaInstaller#fetch before #prelude. 2020-05-11 09:38:26 +01:00
Michelle Nguyen
2264c08cee
Fetch formula resources before unlinking during upgrade.
Fixes #6374.
2020-05-11 09:37:56 +01:00
Mike McQuaid
20a1199375
Refactor CLI to remove unless args_parsed
Refactor the CLI::Args module so it doesn't have different paths to
check arguments depending on whether the arguments have been parsed or
not. Instead, set the values we need from the global ARGV at
first, global initialisation time where they will be thrown away when
the actual arguments are parsed.

To do this some other general refactoring was needed:
- more methods made private when possible
- e.g. `HEAD?` used consistently instead of `head` before arguments
  are parsed.
- formula options are only parsed after named arguments are extracted
2020-05-05 17:47:51 +01:00
Gautham G
38c24d134c ARGV: Deprecate ARGV.casks and replace with Homebrew.args.casks 2020-05-02 13:21:16 +05:30
Mike McQuaid
020d6e2843
upgrade: suggest full_name when appropriate.
Otherwise `brew install foo/bar/baz` when an older version of `baz` is
installed will tell you to run `brew upgrade baz` which won't work.
2020-03-11 17:06:42 +00:00
Mike McQuaid
a7fe0ed847
cmd: use more and cleanup new args APIs. 2020-03-05 09:40:15 +00:00
Gautham Goli
685a6b4da6 ARGV: Replace usages of ARGV.named with Homebrew.args.named 2019-12-18 20:38:21 +05:30
EricFromCanada
2f7c3afeb8 cmd: improve wording of messages, spacing 2019-12-15 00:04:45 -05:00
Gautham Goli
22e25dd593 argv: move formulae to cli/args 2019-12-11 16:36:23 +05:30
EricFromCanada
8a8359cdd4 manpages: sentence rewording for readability
Use active voice when applicable, better verbs & adjectives, preposition usage, proper tense, etc.
2019-08-20 09:05:45 -04:00
EricFromCanada
b4303cd983 manpages: fix command & option descriptions 2019-08-20 09:03:33 -04:00
EricFromCanada
329c6c78be manpages: relocate some sections
Reorder switches as force/quiet/verbose/debug, --installed before --all, and link to SPECIFYING FORMULAE from top of page.
2019-08-20 08:58:20 -04:00
EricFromCanada
6520785307 manpages: grammar fixes 2019-08-20 08:26:26 -04:00
EricFromCanada
a3e0647797 manpages: whitespace fixes 2019-08-20 08:24:20 -04:00
Mike McQuaid
9354081323
Add HOMEBREW_DISPLAY_INSTALL_TIMES
Fixes #6300
2019-07-28 11:12:32 +01:00
Mike McQuaid
653b82a720
cmd/install: fix installing tap formulae with options.
Fixes #6242.
2019-07-25 21:20:49 +01:00
Mike McQuaid
c4f72312ce
Fixup brew style failures. 2019-04-30 09:19:18 +01:00
Mike McQuaid
36dbad3922
Add frozen_string_literal to all files. 2019-04-20 13:27:36 +09:00
Mike McQuaid
e40b171127
Rename cli_parser to cli/parser. 2019-04-17 22:16:50 +09:00
EricFromCanada
fa6404e0f5 grammar fixes 2019-04-13 21:29:32 -04:00
Mike McQuaid
fdb18b8916
brew install --ignore-dependencies: unsupported, developer flag.
People are using this instead of adjusting their PATH.
2019-04-02 08:18:30 +01:00
EricFromCanada
560ccddb69 help: rewrap output to 80 columns
Accounts for paragraph breaks and option descriptions. Also fixes some help text nits.
2019-03-11 12:52:07 -04:00
Mike McQuaid
d64429a736
rubocop: enable Style/IfUnlessModifier. 2019-02-21 12:55:49 +00:00
Mike McQuaid
c25261a665
cmd/install: add --bottle-arch.
This argument was missing when the command-line parser code was added.

Fixes #5741.
2019-02-15 20:13:05 +00:00
Mike McQuaid
267d721988
Note HOMEBREW_NO_INSTALL_CLEANUP in the help/manual 2019-02-03 09:34:00 +01:00
Mike McQuaid
6cb7a00f2d
cmd: remove --help headers and tweak docs. 2019-01-30 21:39:28 +00:00
Mike McQuaid
867b155479
Add missing conflicts to command options. 2019-01-29 19:39:41 +00:00
Mike McQuaid
9eabcdad7d
Make install/reinstall/upgrade options more consistent. 2019-01-29 19:25:59 +00:00
Mike McQuaid
618f75c071
Merge pull request #5619 from GauthamGoli/install-args
install: Use CLI::Parser to parse args
2019-01-29 14:11:22 +00:00
Gautham Goli
c3ba863a30
cmd/install: Add description for --fetch-HEAD option 2019-01-29 18:35:22 +05:30
Mike McQuaid
36016f18a8
cmd/install: fix style. 2019-01-29 09:38:20 +00:00
Mike McQuaid
24eb8e8e54
Remove (now) unused invalid_option_names.
This is handled by `OptionParser` now instead in `cmd/install`.
2019-01-29 08:31:45 +00:00
Mike McQuaid
fd74ce2de6
cmd: remove misrendered markdown link. 2019-01-29 08:31:10 +00:00
Mike McQuaid
9126a5cf8d
cmd/install: fix missing formula handling. 2019-01-29 08:30:22 +00:00
Mike McQuaid
1226470b07
cmd/install: tweak formula option code/output. 2019-01-29 08:30:07 +00:00
Mike McQuaid
5a95d80b5e
cmd/install: fix --keep-tmp description. 2019-01-29 08:29:39 +00:00
Gautham Goli
b40579f69a
install: Use CLI::Parser to parse args 2019-01-27 18:24:33 +05:30
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
170c5493a4
Update deprecations
- Add some `odeprecated`
- Make some `odeprecated` now `odisabled`
- Remove `odisabled` code.
- Remove old update migrations
- Remove GCC 4.0 compiler
- Remove Tiger-only code
- Remove 32-bit-only code
- Remove use of LD64
- Remove GCC 4.3 - 4.8 support.
2019-01-08 19:13:46 +00:00
Mike McQuaid
8144667a71
Cleanup periodically if HOMEBREW_INSTALL_CLEANUP is set.
This will become the default in a later version of Homebrew but has an
opt-out through HOMEBREW_NO_INSTALL_CLEANUP.

Also, always cleanup files older than 120 days and set the general
default value for "old" logs, casks etc. to 30 days.
2019-01-03 16:23:44 +00:00
Jarek Wojciechowski
6c2f41b90c Update docs and manpage for HOMEBREW_INSTALL_CLEANUP 2018-10-30 10:19:45 -04:00
Jarek Wojciechowski
51ca60d6d5 add formula cleanup to install and reinstall 2018-10-29 11:23:32 -04:00
Markus Reiter
e9b9ea49a1 Update to RuboCop 0.59.1. 2018-09-17 03:45:59 +02:00
Andrew Janke
0a2d8c3d4d Add --display-times option to install, reinstall, and upgrade 2018-07-14 11:06:03 -04:00
Andrew Janke
c644392a85 Display collected caveats at end of install or upgrade 2018-07-12 20:41:32 -04:00
Afnan Enayet
133c3a3c0b
Fix typo
* change `MacOS` -> `macOS`
* regenerate manpages
2018-07-06 23:06:41 -04:00