Options collections are backed by Sets, and thus trying to push a new
option with a name that duplicates an existing option cannot succeed.
Later, we can exploit this behavior and remove some conditionals.
... and not just installed ones. Of course, strictly speaking,
reinstalling not-yet-installed formulae makes semantically little
sense, but the big win is that we can tell people (after we have
resolved an issue) to `brew reinstall <formula>` and even if a user
has removed that formula in the meantime, reinstall will do the right
thing. Basically adding --force to uninstall. I think this makes
reinstall more robust.
... and not just installed ones. Of course, strictly speaking,
reinstalling not-yet-installed formulae makes semantically little
sense, but the big win is that we can tell people (after we have
resolved an issue) to `brew reinstall <formula>` and even if a user
has removed that formula in the meantime, reinstall will do the right
thing. Basically adding --force to uninstall. I think this makes
reinstall more robust.
On Unix, the path separator is ':', whereas on Windows,
it is ';'. This is the first of a series of patch to bring
macbrew's and winbrew's codebases closer together.
The main places the magic constant ':' was being used were:
- the $PATH environment variable
- CMAKE-related environment variables
- pkg-config related environment variables
ClosesHomebrew/homebrew#21921.
Signed-off-by: Jack Nagel <jacknagel@gmail.com>
We override ENV[] to always return strings under superenv, because
legacy formulae assume that CFLAGS, etc. are non-nil.
However, the current implementation has a bug. If I simply concatenate
ENV['CFLAGS'] with another string, it mutates ENV['CFLAGS']:
irb> ENV['CFLAGS']
=> ""
irb> ENV['CFLAGS'] + 'a'
=> "a"
irb> ENV['CFLAGS']
=> "a"
Instead, let's simply return an empty string if the key doesn't exist.
This is sufficient because the following are equivalent:
1. ENV['CFLAGS'] += "string"
2. ENV['CFLAGS'] = ENV['CFLAGS'] + "string"
This defines the new HOMEBREW_ARCHS environment variable, which is
currently only set during universal builds, so that the tool wrappers
no longer need to hardcode i386/x86_64.