Improve output in the (rare) cases where a tap offers both commands and
formulae or neither. Also adjust code to stay below the 80 column limit.
ClosesHomebrew/homebrew#44995.
Signed-off-by: Mike McQuaid <mike@mikemcquaid.com>
The xcrun code is stolen right out of the INSTALL script.
Check for user agreement of the Xcode license before permitting any other brew usage to continue.
This prevents the situation where people are instructed to "please re-run as root via sudo" on brew commands.
The check can only fail when Xcode is installed & the active developer dir.
ClosesHomebrew/homebrew#44974.
Signed-off-by: Dominyk Tiller <dominyktiller@gmail.com>
For consistency with `brew command` and the logic in `brew.sh` (both use
`which` to find/validate an external command), we need to filter files
that are not executable.
Otherwise `brew commands` and thus bash completion will offer commands
that will produce an error when attempting to use them.
ClosesHomebrew/homebrew#44999.
Signed-off-by: Mike McQuaid <mike@mikemcquaid.com>
* Move listing all formula names in the top to speed up shell script.
* Simplify logic.
* Only search PR and check bad regex for tty?, which will benefit to
shell script.
ClosesHomebrew/homebrew#44985.
Signed-off-by: Xu Cheng <xucheng@me.com>
Removing all sysroot flags is ok until a non-OS X SDK is needed. In
that case, builds can fail due to the non-OS X SDK being overwritten or
overridden by the OS X SDK.
Sysroot flags are now only stripped if they are an OS X SDK. This is
reliant on only OS X SDKs containing the string "macosx", so this will
break if if the wrong SDK shows up. However, the chances of that
happening seem low, as Apple probably doesn't want to introduce
something OS X that doesn't work with OS X, so it should be robust for
the near future.
This could break in an environment without the command line tools. The
fix for that is a bit more involved, though, so that will have to go
later.
ClosesHomebrew/homebrew#44312.
Signed-off-by: Mike McQuaid <mike@mikemcquaid.com>
There are audit rules which check cellar. Therefore, we need
`ARGV.resolved_formula` to get proper spec and prefix.
ClosesHomebrew/homebrew#44781.
Signed-off-by: Xu Cheng <xucheng@me.com>
The flow is as follow:
* If tap is nil(DIY install), search using name.
* If tap is found, search using full name.
* If tap is found and full name searching failed, search using name.
This usually means the formula may be migrated to different tap.
ClosesHomebrew/homebrew#44771.
Signed-off-by: Xu Cheng <xucheng@me.com>
Add `java` to `SHARE_PATHS` so that `HOMEBREW_PREFIX/share/java` is a folder with symlinks in it, rather than a symlink to a folder for a specific formula.
This way we avoid conflicts if multiple formulas put `jar` files in the
standard location `HOMEBREW_PREFIX/share/java`.
See also:
[pull request 44420](https://github.com/Homebrew/homebrew/pull/44420)
ClosesHomebrew/homebrew#44456.
Signed-off-by: Xu Cheng <xucheng@me.com>
I assume that we want to encourage people hosting
their own bottles to serve them using `https`.
This PR has a trivial change in the example.
We may consider adding some text to the `root_url`
description with a discussion of security.
Also use https://example.com instead of
http://mikemcquaid.com in bottle example.
ClosesHomebrew/homebrew#44651.
Signed-off-by: Xu Cheng <xucheng@me.com>