Superenv scripts have a stripped PATH, which may not include
the brew binary itself. Make this explicitly available to
superenv scripts.
Fixes bsdmake wrapper.
ClosesHomebrew/homebrew#16805.
ClosesHomebrew/homebrew#16846.
Signed-off-by: Adam Vandenberg <flangy@gmail.com>
Xcode.prefix and Xcode.installed? use slightly different heuristics to
find Xcode. In fact, .installed? basically duplicates a portion of the
.prefix logic. In practice, the methods results are usually consistent,
but .installed? does not handle non-standard prefixes if mdfind cannot
locate Xcode (for example, if the user has disabled Spotlight indexing).
Since .installed? is essentially a subset of the .prefix logic, we can
rely on the result from .prefix instead.
FixesHomebrew/homebrew#16790.
Originally written for tigerbrew, but useful enough for core.
Replaces the shelled-out which in utils.rb with a native-ruby
equivalent, which is moderately faster.
ClosesHomebrew/homebrew#16659.
Signed-off-by: Misty De Meo <mistydemeo@gmail.com>
Pass the `--no-pager` flag to git when grabbing a diff summary for a patch as
there is no good reason to invoke a pager for ~2-10 lines that the user must
then exit manually.
Two issues were preventing `brew upgrade` from functioning properly:
- `Tab.for_formula` was used to recover options from prior installs. The
problem is that during an upgrade `for_formula` will be directed to a
non-existant install of the newer version and thus returns a forged tab
claiming no options were invoked.
- The assignment to `installer.install_bottle` requires parenthesis in order
to function properly.
This code makes assumptions about the existence of prefix which are
valid in the context of the installer, but not necessarily in the
context of `brew info`, thus `brew info` on an outdated formula errors
out.
This reverts commit e5b53dd64b769b67805d1054d906f7083939d905.
We support three configurations: Xcode-only, CLT-only, and Xcode with
CLT. Our configuration output should correctly reflect this.
While MacOS::Xcode.version has to continue to return a guess if Xcode is
not installed in order to maintain backwards compatibility, this is an
implementation detail that we don't need to expose to the user. And it
makes `brew --config` output confusing.
So let's only print the "Xcode" line when an actual Xcode installation
is present. This makes it easy to quickly figure out which of the three
possible configurations the user is running.
Addresses Homebrew/homebrew#14941, more or less.
The option `du -s` is equivalent to `du -d0`. The former is a POSIX standard
(IEEE Std 1003.1-2008), whereas the latter is a BSD extension.
From the BSD man page:
`-s Display an entry for each specified file. (Equivalent to -d 0)`
From SUSv4:
`-s Instead of the default output, report only the total sum for each of the specified files.`
http://pubs.opengroup.org/onlinepubs/9699919799/utilities/du.htmlClosesHomebrew/homebrew#16516.
Signed-off-by: Charlie Sharpsteen <source@sharpsteen.net>
This message is either (a) never printed because the tools are
installed, or (b) printed every time this method is called.
See Homebrew/homebrew#16119.
This code shouldn't be responsible for UX anyway, so just remove it and
let other parts of Homebrew be responsible for failing or declaring that
they need the developer tools.
Fixes errors like:
```
$ brew services restart mysql
Error: Formula `mysql` not installed, #startup_plist not implemented or
no plist file found
```
ClosesHomebrew/homebrew#16378.
Signed-off-by: Mike McQuaid <mike@mikemcquaid.com>