GHC 2017-02-20

5 comments.

, https://git.io/vDblY in Homebrew/brew
> do you have a suggestion for whitelisting all HOMEBREW_* without a temporary file?

Here's what I would do, in pure Bash:

```bash
execution_env=()
for key in HOME SHELL PATH TERM LOGNAME USER "${!HOMEBREW_@}"
do
  execution_env+=( "${key}=${!key}" )
done
/usr/bin/env -i "${execution_env[@]}" /bin/bash "$HOMEBREW_LIBRARY/Homebrew/brew.sh" "$@"
```

Note that all variables starting with `HOMEBREW_` will be passed to the env, not only the ones exported. If for some reason you do not want to export all non-exported `HOMEBREW_*` variables, it is doable, but checking whether a variable is exported in Bash is quite ugly. Let me know if you need that.

I wouldn't recommend parsing `env(1)` output, because BSD `env` does not have `-0`, which means you cannot reliably parse the output (can't distinguish the linefeed separating two variables and a linefeed in a variable's value).

, https://git.io/vDFiW in Homebrew/brew
As stated in #932, I think you should at least keep `HOME`, `SHELL`, `PATH`, `TERM`, `LOGNAME` and `USER`, the set of environment variables set by `login(1)` that may very well be expected at runtime (during tests).

Also, more env vars than the aforementioned and `HOMEBREW_*` need to be kept if you decide to take the current approach of enforcing a clean slate on all commands. Examples include but are not limited to `EDITOR` and `VISUAL`. Check [the `ENVIRONMENT` section](https://github.com/Homebrew/brew/blob/master/Library/Homebrew/manpages/brew.1.md.erb#L100) of `brew.1`. Even that list is not exhaustive. Homebrew maintainers need `BINTRAY_USER` and `BINTRAY_KEY` to be whitelisted, for instance.

I think it would much easier if the scope of environment wiping is limited to variants of `install` and `test`, as was the original intention of #932.

, https://git.io/vDFnG in Homebrew/brew
Sure,

```
$ brew bump-formula-pr --url=https://archive.mozilla.org/pub/mozilla.org/js/js185-1.0.1.tar.gz --sha256=e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855 spidermonkey
Error: These open pull requests may be duplicates:
Rename SpiderMonkey binary https://github.com/Homebrew/homebrew-core/pull/9606
Duplicate PRs should not be opened. Use --force to override this error.
Error: Kernel.exit
```

, https://git.io/vDFmM in Homebrew/brew
@MikeMcQuaid @ilovezfs Both are good advice, I'm now matching the title against `/(^|\s)#{Regexp.quote(formula.name)}(:|\s|$)/i`.

> but I'm not sure the Github API supports that.

GitHub API is case insensitive to begin with, isn't it? I fail to see the problem.

, https://git.io/vDFJy in Homebrew/homebrew-core
buku 2.9
========

Created with `brew bump-formula-pr`.