| Age | Commit message (Collapse) | Author |
|
I wasn’t aware this existed when I created puts_hash so: may as well
remove it.
|
|
Handle cases like e.g. `EDITOR="subl -w"`.
|
|
Another attempt at fixing `brew audit` issues around detecting
`revision` and `version_scheme` changes correctly. First done in #1754
and #2086 (reverted in #2099 and #2100).
To ease future debugging a `ph` helper has been added to print a hash
and a series of RSpec tests to verify that the `revision`,
`version_scheme` and `version` formula version audits behave as
expected.
Fixes #1731.
|
|
Hide sensitive tokens from install/test/post.
|
|
Handle when there's no editor variable specified or it's specified but
empty.
|
|
Hide these tokens to avoid malicious subprocesses e.g. sending them
over the network. Also, support using these tokens with environment
filtering and clear `HOMEBREW_PATH` from subprocesses to stop them
sniffing it. Finally, use `HOMEBREW_PATH` to detect Homebrew’s user’s
PATH for e.g. `brew doctor` etc.
|
|
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.
|
|
|
|
|
|
|
|
install tap cmd completions
|
|
Taps can include completion scripts for external commands under
`completions/bash`, `completions/fish`, or `completions/zsh`. `brew tap`
will automatically install these into the correct directories during
install.
|
|
When `brew cleanup` is run it prints out a message like the following:
> This operation has freed approximately 222M of disk space.
The '222M' refers to megabytes but the normal acronym for megabytes would be
'MB'. The 'B' is also missing from kilobytes and gigabytes in the output, so
that's what this commit adds.
|
|
|
|
Since this hack is no longer required, and `Emoji.tick` and `.cross` are
only called in one place, I think it's better to just inline them there
rather than having methods on `Emoji` that just return a one-character
String.
|
|
|
|
Fixes #1635.
|
|
|
|
|
|
Suggested in #1084.
Made the existing warning output entirely to STDERR, because
previously the first line went to STDERR and subsequent ones went
to STDOUT.
|
|
|
|
|
|
|
|
|
|
Use `module_function` for `Homebrew` module.
|
|
|
|
|
|
|
|
|
|
|
|
For tagged commits produces the output:
- `1.0.1`
For untagged commits with a dirty tree produces the output:
- `1.0.1-19-g23efbc5-dirty`
Performance:
```
git describe --tags --dirty 2> /dev/null
0.07s user 0.01s system 96% cpu 0.086 total
```
This means we can tag any commit without needing to manually remember
to bump the revision every time.
|
|
|
|
Save the value of GEM_HOME before unsetting it,
and resetting it when setting up a gem environment.
Fixes #944.
|
|
Closes https://github.com/Homebrew/homebrew-core/issues/4973
|
|
Rubocop: apply auto-corrections and don't use hash-rockets
|
|
`name` is passed as argument to Formulary.factory which could later be
downcased at formulary.rb:349, but Pathname doesn't have a downcase
method. Converting `name` to String as it should be fixes the problem.
Fixes #1000.
|
|
|
|
|
|
Read the old symlinks and migrate them across rather than assuming a
unlink/link will work fine (as users have conflicts.)
|
|
|
|
Move the `LinkedKegs` migration into `utils.rb` so it can also be called
from `brew.rb` on startup.
|
|
This can ask for you to remove directories (e.g.
`/usr/local/share/homebrew`) so don’t call this files to avoid
confusion.
|
|
|
|
These are more files in the HOMEBREW_REPOSITORY that we want to link to
the HOMEBREW_PREFIX.
|
|
Pull more logic into the more generic `link_src_dst_dirs` to be used to
do more linkage.
|
|
--env: support more shells, allow explicit shell selection
|
|
Otherwise looks weird with multiple items.
|
|
|
|
|
|
|