Refs http://stackoverflow.com/questions/9762943
The system ln no longer outputs anything. Though the user can force its output with a --verbose of course. So in cases where it's not the usual of: not writable or existing file, we can ask the user to run with --verbose. I don't particularly like hiding its output, but it just confused the error IMO since it is creating a relative symlink the output was weird every time I've seen it in tickets.
I made a print wrapper so that the brew-link output doesn't get mucked up if an exception is thrown.
Since 5bddaf2e ("Stop supportinb `brew install --force`), the --force
argument is still useful but only to overcome the blacklist
restrictions. Document this.
Signed-off-by: Jack Nagel <jacknagel@gmail.com>
We allow homebrew/dupes for instance, rather than Homebrew/dupes. Because nobody likes shifting in the terminal.
In the process of doing this I discovered some case-insensitive filesystem bugs we have avoided before because I had the foresight to mandate lowercase in formula names. GitHub considers Homebrew and homebrew to be different (even though you can't create both). So we had to allow case insensitivity in tap input. I have made it now so the resulting directory however is lowercased, neatly avoiding the issue. And so we also downcase tap arguments when applying them to tap directories or formula.
For when the symlink for a tap already exists and points to the thing we are about to symlink. This can happen, mostly because my code has sucked, but since the filesystem can be edited by the user at whim, it's possible then too.
Fixes:
$ brew tap adamv/alt
...blah blah blah..
$ brew tap josegonzalez/php
...blah blah blah...
Warning: Could not tap josegonzalez/php/php over mxcl/master/php
Where it should be "over adamv/alt/php".
So you can do e.g.
$ brew install adamv<TAB>
Display all 106 possibilities? (y or n)
$ brew install adamv/alt/openss<TAB>
adamv/alt/openssh adamv/alt/openssl098 adamv/alt/openssl100
Signed-off-by: Jack Nagel <jacknagel@gmail.com>
This means `brew search` always does some network operations. Which is a shame, but I think (for brew) fine. Probably the no-connectivity handling needs to be improved.
Rationale: Let's not have duplicate-names. Insisting on only one directory lets the filesystem enforce this unique-naming criteria for us.
We special-case adamv/alt for now, until we remove it.
Note I removed some of the code that changed the URL to be that of the github.user. Because this doesn't make any sense really. We want people to reference the commit history for whatever fork of homebrew they have checked out. So this is now what it does.
Rationale: well, it should always have been like this!
However now we are opening ourselves up to more-mixed installations of formula not maintained by us, it's important that
The reason it didn't work is it doesn't use ARGV.formulae because it needs to be able to edit stuff that doesn't parse. Most other stuff already works because we are awesome.