426 Commits

Author SHA1 Message Date
Sean Molenaar
e660766514
brew: add DBUS_SESSION_BUS_ADDRESS copy 2021-07-08 10:28:48 +02:00
Dawid Dziurla
ce436791c9
brew: pass GITHUB_ACTIONS_HOMEBREW_MACOS_SELF_HOSTED 2021-06-28 10:50:08 +02:00
Carlo Cabrera
4fb06efe81
Fix TMUX env variable filtering
We currently filter out `TMUX`, but this breaks displaying some caveats.
This also enables an alias I use (and improved by @Rylan12):

    brew alias fzp='!id="$(gh pr list -L200 -R github.com/Homebrew/homebrew-core | TMUX=$HOMEBREW_TMUX fzf-tmux -p "90%,50%" --multi | cut -f1)"; [ -n "$id" ] && brew pr-publish --autosquash $id'
2021-05-13 17:05:18 +01:00
Mike McQuaid
7af68d0f8e
Fix shellcheck failures
A new version of `shellcheck` (I think?) brought us so new warnings and
errors.

To fix:
- pass `--source-path` so we don't need to stop `shellcheck` trying to
  read sourced files every time
- disable some more warnings/errors we don't care about fixing
2021-04-22 13:18:44 +01:00
Mike McQuaid
b358ffd440
Apply suggestions from code review 2021-04-15 17:24:17 +01:00
hyuraku
40ec6250bc bin/brew: repair style 2021-04-16 00:02:13 +09:00
hyuraku
f578673253 add GitHub Actions to explanation 2021-04-13 21:59:55 +09:00
Mike McQuaid
1d0abd5401
Merge pull request #10778 from MikeMcQuaid/deprecate_no_env_filtering
Deprecate HOMEBREW_NO_ENV_FILTERING
2021-03-05 11:24:53 +00:00
Mike McQuaid
d3d4abdbb2
Deprecate HOMEBREW_NO_ENV_FILTERING
It's undocumented so we don't need to do the full deprecation dance here
but let's give people a bit of a head up.
2021-03-04 08:51:44 +00:00
Bo Anderson
0a4fd2201e
Let bin/brew handle its own exporting 2021-03-02 16:59:57 +00:00
Shaun Jackman
c56681a227 Comment needed changes if HOMEBREW_LIBRARY changes 2020-12-16 14:03:10 -08:00
Mike McQuaid
ac84a4b051
Fix ZSH FPATH handling
Don't require it to be exported but shell out to `zsh` instead.

Fixes https://github.com/Homebrew/brew/issues/9387
2020-12-03 16:52:55 +00:00
Mike McQuaid
3002c810be
Improve ZSH completions handling
- Only display the completions caveats from the current shell (assuming
  it's one of Bash, ZSH or Fish)
- If the completions location isn't in the ZSH `FPATH` then link to the
  documentation explaining how to do so.

Fixes https://github.com/Homebrew/brew/issues/8984
2020-11-26 16:08:26 +00:00
JBallin
0a2718bab8
Remove redundant "all" 2020-09-09 11:49:26 -07:00
JBallin
120c2288ca
Improve comment
Co-authored-by: Mike McQuaid <mike@mikemcquaid.com>
2020-09-09 11:47:43 -07:00
JBallin
d985f72d40
Replace Whitelist with Allowlist
Whitelist is a potentially offensive word.
2020-09-09 11:36:42 -07:00
Markus Reiter
ebd4ce467c Output GitHub Actions annotations for brew style. 2020-09-02 16:44:16 +02:00
Mike McQuaid
21d95f306d
bin/brew: allow GITHUB_ACTIONS_HOMEBREW_SELF_HOSTED.
Otherwise test-bot will not behave as expected.
2020-08-07 17:14:11 +01:00
Mike McQuaid
80082f8511
bin/brew: only export CI if not set.
Also: GitHub Actions already sets it.
2020-08-07 12:47:05 +01:00
Mike McQuaid
a1dc809f5b
bin/brew: don't filter GitHub Actions variables. 2020-08-07 10:19:00 +01:00
Mike McQuaid
15a2abd9df
style: re-enable shellcheck.
Ensure that `shellcheck` is run by `brew style` again and fix the
various failures.
2020-07-07 11:53:55 +01:00
Mike McQuaid
147294b1ed
Revert "Set HOMEBREW_GITHUB_API_TOKEN from GITHUB_TOKEN." 2020-04-09 09:29:50 +01:00
Mike McQuaid
4e07d7b9f4
Set HOMEBREW_GITHUB_API_TOKEN from GITHUB_TOKEN.
If `HOMEBREW_GITHUB_API_TOKEN` is not set and `GITHUB_TOKEN` is: let's
use it. `GITHUB_TOKEN` is a somewhat standard env var to set for
GitHub authentication tokens (e.g. used by `hub`).
2020-04-07 10:37:58 +01:00
Mike McQuaid
3381cbf5c7
Use Homebrew::EnvConfig. 2020-04-07 09:58:26 +01:00
Issy Long
e6ff4dda50
Fix graphical brew edit behaviour
- Without `DISPLAY` as an envvar in `bin/brew`, running `brew edit`
  with $EDITOR set to a graphical editor (eg `gedit`), it errored on
  Linux:

```
$ EDITOR=gedit brew edit vim

Editing
/home/linuxbrew/.linuxbrew/Homebrew/Library/Taps/homebrew/homebrew-core/Formula/vim.rb
Unable to init server: Could not connect: Connection refused

(org.gnome.gedit:15470): Gtk-WARNING **: 18:17:07.537: cannot open display:
Error: Failure while executing; `gedit
/home/linuxbrew/.linuxbrew/Homebrew/Library/Taps/homebrew/homebrew-core/Formula/vim.rb`
exited with 1.
```

Fixes #6958.
2020-02-03 20:24:42 +00:00
Maxim Belkin
c87d218126
re-enable disabled builtins and use them 2019-11-04 11:21:13 -06:00
Maxim Belkin
d0d150ace2
attempt at rewording the explanatory comment 2019-11-04 10:40:53 -06:00
Maxim Belkin
7349178adc
move comments outside the 'for cmd' loop 2019-11-04 10:18:53 -06:00
Maxim Belkin
99e308753b
bin/brew: unset functions that override builtins
Also, enable all Bash builtins
2019-11-04 10:02:45 -06:00
Mike McQuaid
0a50a6a393 bin/brew: set CI for GitHub Actions. 2019-08-20 08:48:32 +01:00
Mike Miller
ae1e4e7022 Set DISPLAY environment variable for browser on Linux
Fixes #5692
2019-02-10 23:30:54 -08:00
Shaun Jackman
41c3307484 With symlink Cellar, don't try to find /usr/local prefix 2019-02-05 06:44:04 +01:00
Mike McQuaid
e5b8936893
bin/brew: set CI variable.
It's currently unset on Azure Pipelines and Jenkins so let's set it
here for consistency across our ecosystem.
2019-01-17 09:22:50 +00:00
Mike McQuaid
61fa59e95b
Remove Travis CI specific code
We’re no longer using this for our CI so this is no longer necessary.

Also, migrate `brew tap-new` to use Azure pipelines.
2018-12-30 21:13:24 +00:00
Jacob Wahlgren
2b942f5fea Whitelist TERMINFO environment variable 2018-12-26 22:12:38 +01:00
Shaun Jackman
8278e6156f Revert "bin/brew: Pass CIRCLECI environment variable"
This reverts commit 64a95435814632a7d71d5a77157c40259a6acf8d.

Use HOMEBREW_CIRCLECI rather than CIRCLECI.
See https://github.com/Homebrew/brew/pull/5402
2018-12-14 08:17:21 -08:00
Shaun Jackman
64a9543581 bin/brew: Pass CIRCLECI environment variable 2018-12-13 15:36:52 -08:00
Mike McQuaid
4feb851279
Fix brew style shellcheck warnings. 2018-10-07 22:08:59 +01:00
Chongyu Zhu
bd5b41ed94
Remove environment variables used by hub.
As of #3870, this is no longer needed.
2018-08-08 12:27:41 +08:00
lukertty
68b2962e09
bin/brew: Remove 'LINES'
Signed-off-by: lukertty <lukertty@gmail.com>
2018-05-31 17:04:34 +08:00
lukertty
f308aa4800
Tty.width: use tput cols when stty size returns 0;
bin/brew: add 'COLUMNS' and 'LINES' to env variables

Signed-off-by: lukertty <lukertty@gmail.com>
2018-05-30 12:29:24 +08:00
Andrew Janke
00e21bfdf7 brew: Conciser error when run from nonexistent directory 2018-05-26 07:40:31 -04:00
Mike McQuaid
1f46c8edb5 brew: pass through TRAVIS_ variables. 2018-03-07 15:09:08 +00:00
Mike McQuaid
b3f0e571f4
Merge pull request #3090 from jcs/no_color
Tty: if NO_COLOR env var is present, disable color
2018-02-12 20:50:34 +00:00
joshua stein
7388acb86e Tty: if HOMEBREW_NO_COLOR env var is present, disable color
bin/brew will recognize NO_COLOR variable and copy it to
HOMEBREW_NO_COLOR
2018-02-12 14:19:25 -06:00
Mike McQuaid
a30c74987a brew, diagnostic: tweak CI variable checks.
I've adjusted test-bot in:
603918939a
to set CI=1 for Jenkins to make future JENKINS_HOME checks unnecessary.

The only `TRAVIS_*` variable we care about is `TRAVIS_SUDO` so whitelist
that specifically rather than passing through loads of others.
2018-02-12 16:41:21 +00:00
xiehuc
3e6adb7e33 update all_proxy and man pages #3751 2018-02-01 18:11:29 +08:00
xiehuc
a214387358 add ALL_PROXY for brew
Signed-off-by: xiehuc <xiehuc@gmail.com>
2018-01-30 15:36:35 +08:00
Ivars Berzinsh
25f65c1a13 Added no_proxy to filtered env 2017-12-18 08:53:15 +02:00
Mike McQuaid
e13a93dd75 Default environment filtering to on for all users. 2017-12-05 14:07:28 +00:00