| Age | Commit message (Collapse) | Author |
|
|
|
|
|
Include SSH_AUTH_SOCK (if set) in the filtered environment to avoid SSH
issues with git.
|
|
|
|
|
|
Fixes #3500
|
|
|
|
|
|
Fixes #3494.
|
|
|
|
Otherwise we unconditionally set e.g. `CI`, `TRAVIS`.
|
|
Enable environment filtering for developers.
|
|
- Make `brew pull` pass through Git environment variables
- Whitelist all `TRAVIS_` variables.
|
|
If folks have set `HOMEBREW_DEVELOPER` or run a `dev-cmd` then enable
environment filtering by default for them.
|
|
|
|
|
|
test-bot sets environment filtering itself.
|
|
We use these internally so let's map them to `HOMEBREW_` variables.
|
|
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.
|
|
When creating the necessary HOMEBREW_* variables ensure that they aren't
set if their value would be empty.
|
|
- 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
|
|
These are set as `HOMEBREW_BINTRAY_*` and then used by the rest of
`brew` as normal.
|
|
Fix those that can be done so without tearing Homebrew to pieces and
remove the comments for those that can never be done.
|
|
For many people `brew edit` makes use of the `EDITOR` variable to pick a
sensible editor. With environment filtering enabled unless this editor
is found in the default system PATH it'll fall back to e.g. `vim`.
Instead, ensure that we export the original, pre-filtering `PATH` as
`HOMEBREW_PATH` and use that internally to locate the editor. In future
this same approach will likely be used for requirements to be able to
find tools, too, and for other variables which we want to expose to
Homebrew itself but not other build tools.
Note that `HOMEBREW_PATH` is the same as `PATH` when build filtering
hasn't been enabled.
|
|
|
|
|
|
|
|
|
|
'bin/brew'
|
|
Just sourcing brew.sh causes the "Example usage" msg due to lacking command args but changing the last line of your suggestion to:
/bin/bash "$HOMEBREW_LIBRARY/Homebrew/brew.sh" "$@"
worked.
If all of the 'HOMEBREW.*' vars, that other parts of the system require, are only added in brew.sh then your suggestion is cleaner.
|
|
|
|
|
|
If `/usr/local` is the prefix but not the repository (so bottles can be
used) then running `/usr/local/bin/brew` works great but
`$HOMEBREW_REPOSITORY/bin/brew` assumes the prefix is
`$HOMEBREW_REPOSITORY`. This is a pain when doing work on the Homebrew
repository and having e.g. `bin` in your `$PATH`. Improve this
behaviour so `bin/brew` knows how to handle this situation.
|
|
This will enable this code to be reused in a future commit and makes it
more obvious what’s being done.
|
|
The previous approach of trying to do it on one line was confusing.
|
|
|
|
If `bin/brew` happens to be symlinked to `/brew`, `/bin/brew`, or some
similar location or (worse yet) Homebrew is installed to `/`, then
computation of the prefix and/or repository path could break down and
result in an invalid or empty path.
Closes Homebrew/homebrew-core#2430.
|
|
This is inspired by `quiet_system` with basically the same implication
(suppress output), making the name a lot less confusing and avoiding a
clash with the `chdir` function defined in `Library/brew.sh`.
|
|
We're using /bin/bash and not /bin/sh for a reason so don't allow users
to override this (seen in Homebrew/homebrew#49514).
Closes Homebrew/homebrew#49515.
|
|
symlink
Closes Homebrew/homebrew#49261.
Signed-off-by: Mike McQuaid <mike@mikemcquaid.com>
|
|
This makes the logic match the Ruby code from before it was moved here
(see 390e327f55126f7ee9519bc6c03a0c0aa14f7168)
|
|
HOMEBREW_BREW_FILE and BREW_FILE_DIRECTORY are already canonicalized.
|
|
`bin/brew` is getting a bit bloated and it's annoying to open all of
`HOMEBREW_PREFIX` in your editor of choice and have it search through
the `Cellar`. Let's instead keep the bare minimum in `bin/brew` and
move the rest to `Library`.
Closes Homebrew/homebrew#49185.
Signed-off-by: Mike McQuaid <mike@mikemcquaid.com>
|
|
|
|
This means that internal command aliases can be used for Bash commands
(such as the new, Bash-based `brew update`).
Fixes Homebrew/homebrew#49182.
Closes Homebrew/homebrew#49184.
Signed-off-by: Mike McQuaid <mike@mikemcquaid.com>
|
|
Also, rename the existing updater to `update-ruby` to allow using as
a fallback. It will eventually be removed.
Closes Homebrew/homebrew#49109.
Signed-off-by: Mike McQuaid <mike@mikemcquaid.com>
|
|
Closes Homebrew/homebrew#48803.
|
|
This also means `bin/brew` is again consistent with `brew command` and
`brew commands`.
|
|
This should help to avoid collisions with external commands and other
shell functions in the future and is closer to what we do in Ruby, where
commands are namespaced by being methods of the `Homebrew` module.
|
|
We have asserted before that the 1st argument is the command name. No
need to pass it to the bash command, which will make the argument
handling for the command itself a bit easier.
|