113 Commits

Author SHA1 Message Date
Markus Reiter
540fa4e84b Pass quiet when tapping external commands. 2020-09-09 21:49:22 +02:00
Rylan Polster
5b393cb049 help: show help text for tapped external command
Previously, running e.g. `brew help bundle` when homebrew-bundle was not
tapped would tap homebrew-bundle and then run `brew bundle` showing
`Error: No Brewfile found` instead of the expected help text.
2020-09-08 15:44:13 -04:00
Maxim Belkin
a6d29894d9 cleanup: fix and reuse portable ruby logic.
Align the logic in `cleanup_portable_ruby` with that in `ruby.sh`.

Co-authored-by: Maxim Belkin <maxim.belkin@gmail.com>
Co-authored-by: Mike McQuaid <mike@mikemcquaid.com>
2020-09-03 09:43:41 +01:00
Dawid Dziurla
102afda9df
Remove usages of HOMEBREW_INSTALL_BUNDLER_GEMS_FIRST 2020-08-24 13:35:49 +02:00
Mike McQuaid
a4d0174d7b
prof: improve brew prof functionality.
- Add `--stackprof` to allow using stackprof
- Use the latest version of `ruby-prof`
- Automatically open the generated HTML output
2020-08-20 13:01:58 +01:00
Markus Reiter
6524802079 Pass remaining args to Help. 2020-08-06 16:13:14 +02:00
Markus Reiter
490e503b1b Replace Homebrew.args with Context. 2020-08-06 16:13:14 +02:00
Markus Reiter
26688145f0 Don't use global Homebrew.args in brew.rb. 2020-08-06 16:12:52 +02:00
Markus Reiter
7926f7fc82 Pass args.verbose? to BuildError#dump. 2020-08-06 16:12:52 +02:00
Markus Reiter
be2d19fe07 Refactor handling of formula options in CLI::Parser. 2020-07-31 17:46:54 +02:00
Markus Reiter
d4c2ffd705 Refactor CLI::Parser. 2020-07-31 15:07:17 +02:00
Markus Reiter
ca18a72673 Refactor output_unsupported_error. 2020-07-30 03:21:12 +02:00
Markus Reiter
a895f398ed Use BuildError#formula instead of args. 2020-07-25 02:37:10 +02:00
Bo Anderson
681dafd028 Adjust container checks for GitHub Actions changes 2020-07-15 19:12:33 +01:00
rmnull
d1b6a85819
show help for aliased commands 2020-06-22 10:23:00 +05:30
Mike McQuaid
ef95b59ed4
Remove HomebrewArgvExtension
Fixes #5730
2020-05-23 19:39:11 +01:00
Mike McQuaid
bc27e38f18
Remove ARGV.debug?
Replace with `Homebrew.args.debug?`.

Part of #5730.
2020-05-23 14:38:58 +01:00
Mike McQuaid
3381cbf5c7
Use Homebrew::EnvConfig. 2020-04-07 09:58:26 +01:00
Mike McQuaid
c4c0e45aba
brew.rb: warn on deprecated/disabled formula. 2020-04-01 13:43:02 +01:00
Issy Long
7605924232
When a HEAD build fails, output an instruction to raise PRs not issues
- This has to be in multiple places, hence a new method. A patch failing
  to apply, which is a common occurrence with HEAD builds because the
  patch is already upstream, raises a different exception to another,
  "normal" build failure.

Tested with:

```
╭─issyl0@rigel /home/linuxbrew/.linuxbrew/Homebrew ‹head-builds-arent-officially-supported*›
╰─ $ brew install --HEAD mtr
==> Cloning https://github.com/traviscross/mtr.git
Updating /home/issyl0/.cache/Homebrew/mtr--git
==> Checking out branch master
Already on 'master'
Your branch is up to date with 'origin/master'.
HEAD is now at 155f76a Merge pull request #340 from Sea-n/master
==> Downloading https://github.com/traviscross/mtr/pull/315.patch?full_index=1
Already downloaded: /home/issyl0/.cache/Homebrew/downloads/82d9d939303d8fceb7a3ae071ecd49a5f075e0fb451b308653b555ffbae74336--315.patch
==> Patching
==> Applying 315.patch
patching file packet/probe.c
Hunk #1 FAILED at 323.
Hunk #2 FAILED at 364.
2 out of 2 hunks FAILED -- saving rejects to file packet/probe.c.rej
Error: Failure while executing; `patch -g 0 -f -p1 -i /tmp/mtr--patch-20200330-10734-avjmyy/315.patch` exited with 1.
HEAD builds are unsupported by maintainers - please file pull requests instead of issues.
```

and

```
╭─issyl0@rigel /home/linuxbrew/.linuxbrew/Homebrew ‹head-builds-arent-officially-supported*›
╰─ $ brew install --HEAD zookeeper
==> Cloning https://gitbox.apache.org/repos/asf/zookeeper.git
Updating /home/issyl0/.cache/Homebrew/zookeeper--git
==> Checking out branch master
Already on 'master'
Your branch is up to date with 'origin/master'.
HEAD is now at 1ff1b779 ZOOKEEPER-3755: Use maven to create fatjar
==> ant compile_jute
Last 15 lines from /home/issyl0/.cache/Homebrew/Logs/zookeeper/01.ant:
2020-03-30 21:45:10 +0100

ant
compile_jute

Picked up _JAVA_OPTIONS: -Duser.home=/home/issyl0/.cache/Homebrew/java_cache
Buildfile: build.xml does not exist!
Build failed

READ THIS: https://docs.brew.sh/Troubleshooting

HEAD builds are unsupported by maintainers - please file pull requests instead of issues.
```
2020-03-31 14:49:02 +01:00
Mike McQuaid
b5165ed7e8
Clarify tap issues should not be reported to Homebrew.
Instead, direct people to the actual tap.
2020-03-11 10:57:36 +00:00
Mike McQuaid
8a9dcad2c7
Move more command handling logic to commands.rb. 2020-02-02 17:05:45 +01:00
Mike McQuaid
eb87651341
Revert "Revert "help: print cli/parser help message if used"" 2020-02-02 16:36:59 +01:00
Mike McQuaid
2082379a61
Revert "help: print cli/parser help message if used" 2020-02-02 09:11:23 +01:00
Mike McQuaid
b03efb4356
Move shared man/help logic to cli/parser. 2020-02-01 19:05:03 +01:00
Dawid Dziurla
e9274b3827
help: print cli/parser help message if used 2020-01-26 18:33:13 +01:00
Jonathan Chang
d76c7f2380 brew.rb: update Ruby version check 2019-11-04 21:06:27 +11: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
7ab5fef7f2
brew.rb: remove unless ||. 2019-04-19 10:12:03 +09:00
Michka Popoff
49aad7ddb3 brew: remove sudo call only in docker context
Follow up from #6018
2019-04-18 17:16:05 +02:00
Michka Popoff
1c016ecee7 brew: remove sudo call
except for "brew services" command
2019-04-16 20:35:41 +02:00
Mike McQuaid
a679ec1cb3
Revert "brew: remove sudo call" 2019-04-12 08:29:07 +01:00
Mike McQuaid
d12e39633c
Remove odisabled. 2019-04-01 15:07:50 +01:00
Michka Popoff
583a754d9f brew: remove sudo call
Closes #5865
2019-03-24 17:53:39 +01:00
Mike McQuaid
b3c33d6d51
brew.*: run Bundler immediately when needed.
This is needed to avoid gem conflicts when `global.rb` is loaded for some commands.
2019-02-21 12:56:22 +00:00
Mike McQuaid
d64429a736
rubocop: enable Style/IfUnlessModifier. 2019-02-21 12:55:49 +00:00
Mike McQuaid
948b367ac3
brew.rb: don't try to uninstall brew-cask keg.
This is long gone at this point so no need to keep this code around.
2019-02-13 15:43:17 +00:00
Mike McQuaid
9b5ab7fbb7
Merge pull request #5598 from MikeMcQuaid/odeprecated-odisabled
Update deprecations and cleanup
2019-01-27 12:13:26 +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
57d7d4c9dd
brew.rb: duplicate MissingEnvironmentVariables exception.
Fixes #5592.
2019-01-23 15:40:44 +00:00
Mike McQuaid
63cfb0ff61
Better handle missing environment variables when updating
Try to re-exec the Homebrew binary to get the environment variables we
need and give up if that doesn't work.
2019-01-12 15:59:08 +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
EricFromCanada
baf75af908 brew: prepend shims to PATH used by _system
Ensures `system` and `safe_system` use brewed git if available.
2018-10-26 23:47:59 -04:00
Markus Reiter
c4d418e126 Use ActiveSupport’s #second. 2018-10-07 23:10:56 +02:00
Markus Reiter
7a991985a4 Run tests with HOMEBREW_DEVELOPER unset. 2018-09-19 19:43:45 +02:00
Markus Reiter
e9b9ea49a1 Update to RuboCop 0.59.1. 2018-09-17 03:45:59 +02:00
Markus Reiter
516a39f5a4 Move migrations into UpdateMigrator module. 2018-08-31 16:51:23 +02:00
Mike McQuaid
40fc520a45 brew.rb: only output "Kernel.exit" in debugging mode.
This doesn't seem to make sense for `--verbose`.
2018-08-16 09:58:39 +01:00
Markus Reiter
e6b45842e8 Refactor odeprecated. 2018-08-15 12:16:02 +02:00