190 Commits

Author SHA1 Message Date
Bo Anderson
db8ab91429
Remove missing env retry mechanism 2022-06-17 19:47:55 +01:00
Rylan Polster
b896f6cb0d
Allow more developer commands with HOMEBREW_INSTALL_FROM_API 2022-06-16 21:31:15 -04:00
Rylan Polster
0c520844b4
Improve message 2022-02-11 10:49:21 -05:00
Phoenix Eliot
7a5eb3dbdb Fix rubocop warning 2022-02-08 12:14:00 -05:00
Phoenix Eliot
9e2c5910c5 Simplify 'brew cask' check 2022-02-08 12:08:32 -05:00
Phoenix Eliot
f18cbd2066 Add helpful error message when attempting to run brew cask 2022-01-11 14:17:03 -05:00
Mike McQuaid
11c5f8f05a
Improve discovery of some environment variables
There's a few bits of functionality that Homebrew has changed over the
years, makes sense as a sensible default but some people find really
annoying:

- automatically running `brew update`
- automatically running `brew cleanup`
- automatically upgrading outdated dependents
- automatically reinstalling broken dependents

For each of these: let's improve the documentation of the commands
whose behaviour is changed and the environment variables themselves.
2021-11-25 09:10:59 +00:00
Rylan Polster
249886f36f
Cleanup developer mode handling in brew.{sh,rb} 2021-10-26 01:29:15 -04:00
Rylan Polster
06b1e1f495
Improve messaging
Co-authored-by: Eric Knibbe <3324775+EricFromCanada@users.noreply.github.com>
2021-10-22 17:15:19 -04:00
Rylan Polster
0b8032d421
Document HOMEBREW_INSTALL_FROM_API 2021-10-22 12:37:57 -04:00
Bo Anderson
30b24cf4ad
Use HOMEBREW_CURL universally, including formulae 2021-10-04 02:03:04 +01:00
Bo Anderson
d4b88b1b55
brew.rb: remove gem setup for stackprof 2021-08-11 02:13:37 +01:00
Rylan Polster
27ba803bb5
Remove need for HOMEBREW_NO_DEV_CMD_MESSAGE 2021-07-20 11:47:31 -04:00
Rylan Polster
564a207bad
Add HOMEBREW_NO_DEV_CMD_MESSAGE 2021-07-19 10:06:38 -04:00
Rylan Polster
9f15432742
Fix tests 2021-07-17 14:08:38 -04:00
Rylan Polster
5649d339d7
Show message when developer mode is turned on 2021-07-14 11:01:46 -04:00
Mike McQuaid
d6957a3acb
Homebrew 3.0.0 deprecations/disables 2021-01-29 19:50:24 +00:00
Rylan Polster
ebba369887
Tap: add untapped_official_taps method 2021-01-20 12:02:24 -05:00
Rylan Polster
3ca68c076e
Don't tap user-untapped official taps 2021-01-19 17:55:03 -05:00
Rylan Polster
4b8477ba70 Completions, Settings: move to Homebrew namespace 2021-01-13 11:20:28 -05:00
Rylan Polster
f1f3fdc315 settings: add module for managing git config settings 2021-01-12 16:27:25 -05:00
Markus Reiter
9ecdf117b3 Fix broken output on CI. 2020-12-11 22:15:18 +01:00
Mike McQuaid
9216d8abe6
rubocop-rails: make fixes. 2020-12-02 10:43:04 +00:00
Dustin Rodrigues
1c925d52fe docs - remove Discourse from communication methods 2020-11-15 13:20:03 -05:00
Mike McQuaid
5afff3f3aa
Handle macOS Homebrew on ARM
- Output `brew doctor` and `brew install` messages noting this configuration is (currently) unsupported and encourage use of Rosetta instead
- Output Rosetta 2 usage in `brew config` on ARM (whether in Rosetta 2 or not)
- Check the architecture of (newly installed) dependencies and ensure they are using the correct architecture.
- Don't allow installing macOS Intel Homebrew in macOS ARM Homebrew default prefix (and vice versa
- Actually write out the architecture of dependencies to the tab rather than generating and throwing them away
- Set and document the expected default prefix for macOS Intel Homebrew, macOS ARM Homebrew (`/opt/homebrew`) and Homebrew on Linux

While we're here:
- Don't say Big Sur is a prerelease version but still make it clear we
  don't support it (yet).
- Don't reference non-existent IRC channel
2020-11-12 17:06:47 +00:00
Markus Reiter
5bc626bbe1 Completely deprecate Homebrew.args. 2020-11-11 08:52:55 +01:00
Markus Reiter
24ae318a3d Move type annotations into files. 2020-10-10 14:59:39 +02:00
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