496 Commits

Author SHA1 Message Date
Kai Hoewelmeyer
5db5c6e99a fix: allow running bin/brew with SHELLOPTS=nounset
A similar fix is already present on line 6.
2022-11-26 17:41:36 +01:00
Mike McQuaid
2961132e01
tests: fix under GitHub Codespaces. 2022-11-03 16:33:04 +00:00
Mike McQuaid
3fcd62238a
Merge pull request #13595 from MikeMcQuaid/no_homebrew_no_env_filtering
bin/brew: remove HOMEBREW_NO_ENV_FILTERING.
2022-08-23 11:21:30 +01:00
Martijn Pieters
e3a67d2220 brew: add XDG_RUNTIME_DIR copy
Further support for brew services; `systemctl --user` falls back to
XDG_RUNTIME_DIR if no DBUS daemon is available.
2022-08-11 21:00:38 +01:00
Mike McQuaid
0f54f342e6
bin/brew: remove HOMEBREW_NO_ENV_FILTERING.
It's been deprecated for a long time. Add a disabling message to be
nice (that we'll remove in future).
2022-07-22 14:39:21 +01:00
Bo Anderson
fad20859b1
Merge pull request #13594 from MikeMcQuaid/remove_github_actions_homebrew_macos_self_hosted
bin/brew: remove GITHUB_ACTIONS_HOMEBREW_MACOS_SELF_HOSTED.
2022-07-22 14:23:15 +01:00
Mike McQuaid
f4103e5d61
bin/brew: never use HOMEBREW_PATH from users.
Fixes https://github.com/Homebrew/brew/issues/13548
2022-07-22 10:33:43 +01:00
Mike McQuaid
25364cbe62
bin/brew: remove GITHUB_ACTIONS_HOMEBREW_MACOS_SELF_HOSTED.
It has been more than a few days.
2022-07-22 10:31:10 +01:00
danielnachun
5a711decff
bin/brew: add GITHUB_RUN_ATTEMPT 2022-07-21 16:02:04 -07:00
Kid
721a27d68d dev-cmd/cat: support setting bat theme via environment variable 2022-06-06 08:44:47 +08:00
Carlo Cabrera
f88e376a98
Avoid filtering TERMINFO_DIRS
Closes #13248.
2022-05-12 16:03:35 +08:00
Bo Anderson
97b94a78b4
bin/brew: allow GITHUB_ACTIONS_HOMEBREW_SELF_HOSTED 2021-12-13 23:05:32 +00:00
XuehaiPan
cf7def0c68
style: apply shellcheck autofix 2021-11-08 03:07:25 +00:00
XuehaiPan
1be5e97e82 brew: fail fast when not using bash 2021-09-16 21:20:57 +08:00
XuehaiPan
bd8db0737d style: fix inconsistent code style for shell scripts 2021-09-16 01:06:19 +08:00
XuehaiPan
c2d5d84b21 Merge remote-tracking branch 'upstream/master' into fix-inconsistent-shell-style 2021-09-16 01:01:49 +08:00
XuehaiPan
954c3596b2 brew: fail fast when not using bash 2021-09-15 17:10:05 +08:00
XuehaiPan
baac35785c style: do not allow multi-line for statements 2021-09-15 15:00:23 +08:00
XuehaiPan
3f96d963f7 style: fix inconsistent code style for shell scripts 2021-09-15 14:59:01 +08:00
Bo Anderson
a84b13b6e9
bin/brew: actually quiet cd
Fixes #11886.
2021-08-19 13:33:31 +01:00
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