99 Commits

Author SHA1 Message Date
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
Markus Reiter
5841b992ac Refactor $LOAD_PATH. 2018-07-17 23:38:57 +02:00
Markus Reiter
18e46b3ec2 Fix usage of HOMEBREW_LOAD_PATH. 2018-06-18 16:23:35 +02:00
Markus Reiter
42e34db562 Always add cask/lib to $LOAD_PATH. 2018-06-07 18:42:30 +02:00
Andrew Janke
8b55cb5ecb Refactor commands to remove "require cmd/help" 2018-06-07 04:59:59 -04:00
Markus Reiter
c53a52daee Move --version logic into cmd/--version.rb. 2018-05-21 05:35:44 +02:00
Mike McQuaid
9fca172d03 Fix HOMEBREW_RUBY_WARNINGS="-w"
Fix various circular requirements, method redefinitions, etc.
2018-04-07 20:28:56 +01:00
Dan Wendorf
151c2861ac Custom commands can show help
We attempted to find the help message for commands before loading custom
commands in the path.
2017-11-18 17:04:54 -08:00
Mike McQuaid
7a68b4a3f9 Refactor command handling code
Don’t rely on having external commands always present in the PATH in
order to find them. Instead, provide an accessory method to Tap so
they can be added and used when needed.

While we’re here, do some general refactoring and cleanup of the
command code in these places.
2017-11-05 15:37:57 +00:00
Mike McQuaid
29f81812cc brew.rb: cleanup PATH setup.
Avoid adding all the tap commands to the PATH when not necessary.
2017-11-03 14:50:17 +00:00
Markus Reiter
632fdca2d4 Merge pull request #3306 from amyspark/hacktoberfest-quash-cask-help
Fixes querying Cask commands' help
2017-10-24 20:54:24 +02:00
L. E. Segovia
09e26b1152 brew style fixes 2017-10-24 10:17:11 -03:00
L. E. Segovia
2bfc7904fb Simplify cask help check 2017-10-24 08:04:49 -03:00
L. E. Segovia
75de4db003 Let Cask handle the -h flag 2017-10-20 16:51:26 -03:00
L. E. Segovia
16faf6fca9 Shorten HOMEBREW_HELP set/unset 2017-10-18 08:47:52 -03:00