406 Commits

Author SHA1 Message Date
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
David Christenson
489eae91ba
Include SSH_AUTH_SOCK in filtered environment
Include SSH_AUTH_SOCK (if set) in the filtered environment to avoid SSH
issues with git.
2017-11-29 15:30:57 -07:00
Mike McQuaid
959f54d3ce
bin/brew: add lowercase variants. 2017-11-29 12:06:22 +00:00
Mike McQuaid
4bd184b706
Merge branch 'master' into master 2017-11-29 11:39:04 +00:00
Bruno R. Barreyra
230a333950 Adding proxy variables to FILTERED_ENV
Fixes #3500
2017-11-29 11:29:10 +01:00
Markus Reiter
9d98f1a8ab Whitelist SUDO_ASKPASS environment variable. 2017-11-29 00:36:16 +01:00
Markus Reiter
f7066bae27 Fix Utils::Shell.parent. 2017-11-28 21:05:51 +01:00
Mike McQuaid
63408a10ff bin/brew: whitelist http_proxy.
Fixes #3494.
2017-11-28 14:52:08 +00:00
Mike McQuaid
f7baa3b380 bin/brew: whitelist JENKINS_* vars. 2017-11-27 16:32:03 +00:00
Mike McQuaid
cd7049bb72 bin/brew: don't set empty, unfiltered variables.
Otherwise we unconditionally set e.g. `CI`, `TRAVIS`.
2017-11-27 14:43:24 +00:00
Mike McQuaid
f262cbc531
Merge pull request #3487 from MikeMcQuaid/dev-env-filtering
Enable environment filtering for developers.
2017-11-27 11:20:42 +00:00
Mike McQuaid
fb6cf0c3f8 More environment filtering fixes
- Make `brew pull` pass through Git environment variables
- Whitelist all `TRAVIS_` variables.
2017-11-27 10:48:03 +00:00
Mike McQuaid
b26a0d4a91 Enable environment filtering for developers.
If folks have set `HOMEBREW_DEVELOPER` or run a `dev-cmd` then enable
environment filtering by default for them.
2017-11-27 10:15:26 +00:00
Mike McQuaid
3625c69625 bin/brew: tweak CI whitelisting. 2017-11-18 09:10:25 +00:00
Mike McQuaid
166a75b9d6 bin/brew: passthrough CI var. 2017-11-18 09:08:38 +00:00
Mike McQuaid
c86299188f bin/brew: no environment filtering on test-bot.
test-bot sets environment filtering itself.
2017-11-17 14:43:05 +00:00
Mike McQuaid
5241d07474 environment filtering: pass through TRAVIS vars.
We use these internally so let's map them to `HOMEBREW_` variables.
2017-11-13 10:01:54 +00:00
Mike McQuaid
3f8f2c6726 bump-formula-pr: use GitHub vars under env filter.
Ensure that the various variables are passed through and reset
correctly. If we end up doing this in a bunch of places we may add some
helpers to simplify this.
2017-11-07 07:54:34 +00:00
Mike McQuaid
9c85d737ad bin/brew: don't set blank HOMEBREW_* variables.
When creating the necessary HOMEBREW_* variables ensure that they aren't
set if their value would be empty.
2017-05-14 20:05:26 +01:00
Mike McQuaid
8205e61e64 More environment filtering tweaks
- only document HOMEBREW_* variables in the manpage (although still
  read from all the original environment variables).
- resort manpage environment variables in alphabetical order
- check the original path for trailing slashes
2017-05-13 11:42:01 +01:00
Mike McQuaid
adab59cd7a brew: set Bintray variables.
These are set as `HOMEBREW_BINTRAY_*` and then used by the rest of
`brew` as normal.
2017-04-23 21:04:15 +01:00