The fix changes behavior in same cases, but those cases were all either
broken or showed unexpected behavior. The new behavior is very simple:
- If an argument starts with `--<option-name>=`, return whatever comes
after the equals sign.
Prior to this change, `ARGV.value` showed some unexpected behavior:
- `ARGV.value("foo")` returned `nil` for `--foo=` because at least one
character needed to be present after the equals sign. (All other
option parser implementations I'm aware of allow for empty values.)
- `ARGV.value("bar")` returned `"baz"` for `--foo=--bar=baz` because the
regular expression was not anchored to the start of the argument.
- `ARGV.value("++")` raised an exception because the string wasn't
escaped for use in the regular expression. (An unlikely corner case.)
Closes#231.
Signed-off-by: Martin Afanasjew <martin@afanasjew.de>
Also enables sandbox for --interactive and --debug use of install
and test, using automatic retention.
Closes#66.
Signed-off-by: Andrew Janke <andrew@apjanke.net>
Homebrew developers have the corresponding variable permanently set in
their environment and wanting to appear like a Homebrew developer for a
single invocation is exceedingly rare. Additionally, the option won't be
recognized by `bin/brew`. (It is also undocumented.)
Using `HOMEBREW_DEVELOPER=1 brew <command>` is still possible, and not
more inconvenient than passing the `--homebrew-developer` option.
ClosesHomebrew/homebrew#48322.
Signed-off-by: Martin Afanasjew <martin@afanasjew.de>
Add these new errors, and guards in formula installation and
cmd/{,un,re}install to match, move can_build? to the MacOS module,
flatten conditions, remove redundant can_build? check
reinstate removed (doctor) check
Everything that used HOMEBREW_CELLAR/canonical_name
could point to something that doesn't exist because
loader_for tries to load new name formula if no old
name found. However there can be software installed
from path with the same name that renamed formulae
had and we still need to link/unlink/uninstall etc
that software. The solution is Formulary#to_rack
method that returns rack for given name.
- Add Formulary#to_rack
- Update ARGV.kegs
- Update cmd/switch
People want to install things like GIMP using Homebrew so let's make it
easier for them to find a decent installation method.
ClosesHomebrew/homebrew#34496.
Signed-off-by: Mike McQuaid <mike@mikemcquaid.com>
It might be best not to use the word "lame" here, as it's often considered to be an ableist slur.
ClosesHomebrew/homebrew#30915.
Signed-off-by: Jack Nagel <jacknagel@gmail.com>
Symlinks in opt and LinkedKegs point directly at a keg in the cellar, so
only resolving one symlink should suffice, and make it clear what path
we are actually interested in.