aboutsummaryrefslogtreecommitdiffstats
path: root/Library/Homebrew/cmd/link.rb
AgeCommit message (Collapse)Author
2017-05-29Fixup all RuboCop warnings.Mike McQuaid
2017-04-22More deprecations.Mike McQuaid
Deprecate more methods. Internal APIs have been verified to be unused elsewhere and removed. External APIs have had deprecation methods added. Existing deprecations have been either upgraded to produce warnings or no longer deprecated and the reasoning documented.
2017-04-02Document all short flags.Mike McQuaid
2017-04-01Fix the 'export PATH' message in `link` for a keg-only formulaEugene Nikolsky
Commit 4cae6a724e6d684eb157dd6d7328755694f228b2 introduced the message, but it printed the wrong path, e.g. for `brew link sqlite`: ``` If you need to have this software first in your PATH instead consider running: echo 'export PATH="/usr/local/opt/sqlite:$PATH"' >> ~/.zshrc/bin ``` where `/bin` is appended at the end, but should be inserted before `:$PATH`: `echo 'export PATH="/usr/local/opt/sqlite/bin:$PATH"' >> ~/.zshrc`. This patch fixes that and updates a test to verify it.
2017-03-23link: tell users of `brew link --force` about opt.Mike McQuaid
If people are force-linking keg-only things they should probably be told that they can add the opt prefix to their PATH instead.
2016-10-02Remove `private_class_method` from commands.Markus Reiter
2016-10-02Use `module_function` for commands.Markus Reiter
2016-07-31link: don't allow more openssl/libressl linkage.Mike McQuaid
This extends the approach in #597 to further prevent linkage of formulae that conflict with the system OpenSSL and can cause the issues described in that issue.
2016-07-29link: don't link /usr/local openssl.Mike McQuaid
See https://langui.sh/2015/07/24/osx-clang-include-lib-search-paths/ for an explanation and https://gist.github.com/tdsmith/4b502c5cc6e7d358acdf for reproduction instructions.
2016-04-10Add all the top level commentsMax Nordlund
2015-10-08handle TapFormulaWithOldnameAmbiguityErrorXu Cheng
Closes Homebrew/homebrew#44705. Signed-off-by: Xu Cheng <xucheng@me.com>
2015-08-03Core files style updates.BrewTestBot
Closes Homebrew/homebrew#42354. Signed-off-by: Mike McQuaid <mike@mikemcquaid.com>
2015-05-27link: load formula from rackXu Cheng
2014-06-24Rename Keg#fname to Keg#nameJack Nagel
2014-06-22Move deprecated Formula class methods to compatJack Nagel
These have all been moved to Formulary.
2014-06-19Only "extend self" once on the Homebrew moduleJack Nagel
2014-04-21Adjust link command for updated error handlingJack Nagel
2014-03-27link: fix output ordering when exceptions are raisedJack Nagel
2014-03-27link: print wrapper is not always requiredJack Nagel
2014-03-26Add missing newline to link and unlink in verbose modeJack Nagel
2013-06-08Consolidate sudo checks.Adam Vandenberg
Closes Homebrew/homebrew#20318.
2013-05-20link: extract keg-only check into a helper methodJack Nagel
2013-04-10link: eliminate naked rescueJack Nagel
2013-04-06Fix another handful of warningsJack Nagel
2013-01-29Only check keg-only if we map to a formulaAdam Vandenberg
2013-01-29Require --force to link keg-only.Adam Vandenberg
Closes Homebrew/homebrew#13349.
2013-01-26FormulaInstaller: implement installation locksJack Nagel
FormulaInstaller now attempts to take a lock on a "foo.brewing" file for the formula and all of its dependencies before attempting installation. The lock is an advisory lock implemented using flock(), and as such it only locks out other processes that attempt to take the lock. It also means that it is never necessary to manually remove the lock file, because the lock is not enforced by I/O. The uninstall, link, and unlink commands all learn to respect this lock as well, so that the installation cannot be corrupted by a concurrent Homebrew process, and keg operations cannot occur simultaneously.
2012-10-22Add relinking instructions.Adam Vandenberg
Closes Homebrew/homebrew#15488.
2012-10-20brew ln --force is now brew ln --overwriteMisty De Meo
* Renames --force to --overwrite, freeing up brew ln --force for Homebrew/homebrew#13349 * Changes --dry-run to preview linking by default, rather than overwriting. An overwrite dry-run can be simulated via both --dry-run --overwrite * Adds some basic Keg tests
2012-08-10Be more verbose when users insist on being sudoersMax Howell
If you google for "Cowardly refusing to sudo brew" you get a lot of confused users who didn't read any of the Homebrew documentation and then had a hissy-fit.
2012-07-11use keg.linked?Adam Vandenberg
2012-07-09ARGV: add .dry_run? methodMisty De Meo
Add an ARGV.dry_run? helper method for '--dry-run'/'-n' now that '-n' is being used as a git-style dry-run in two commands. Closes Homebrew/homebrew#12898. Signed-off-by: Misty De Meo <mistydemeo@gmail.com>
2012-07-09link: add --force and --dry-run optionsMisty De Meo
`brew link` can now be made to delete any conflicting files using the --force argument. It also has a --dry-run option, similar to git clean -n, which will list any files which would be deleted without touching the filesystem. Closes Homebrew/homebrew#11811. Signed-off-by: Misty De Meo <mistydemeo@gmail.com>
2012-03-20Remove broken `puts` from verbose `brew link`Jack Nagel
The print wrapper which has its own `puts` broke this line; though with the changes to `link` it isn't necessary any longer, so just remove it. Signed-off-by: Jack Nagel <jacknagel@gmail.com>
2012-03-19Don't error if exact link already existsMax Howell
If the link already exists exactly (well almost exactly) as we are about to correct it, then it's okay. Otherwise we error out. This is a safe choice, and really, the correct choice too. This will prevent the tickets like Homebrew/homebrew#11050 from occurring.
2012-03-19Better error when linking failsMax Howell
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.
2012-03-16Leave kegs keg-only if linking step failsMax Howell
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
2012-03-04Don't allow `brew link` to be run as sudoMax Howell
2012-02-04Warn the user of required argumentsJack Nagel
Signed-off-by: Jack Nagel <jacknagel@gmail.com>
2012-02-01link: add missing newline in verbose modeJack Nagel
Signed-off-by: Jack Nagel <jacknagel@gmail.com>
2011-08-24Fix keg exception pretty outputMax Howell
2011-08-22Specify that they are symlinksMax Howell
2011-03-12Refactor the brew command into one file per commandMax Howell
The code was sucking. To the extent that maintenance was hard. It's a lot easier to work with code that is sensibly split at sensible boundaries. So now it is more like that. But the refactor is minimal. Because we don't want you to have more merge hell than absolutely necessary. If you merge you will need to pay attention to brew.h.rb (as it is deleted) and bin/brew (as command logic is gone). It will be painful, but you will just have to help git out by moving any changes around manually. Note compatibility.rb. It ensures that any function renames or removals don't break anything. We're pretty serious about backwards compatibility. And that's because we encourage you to hack around with the innards. And we couldn't do that if we would then just make stuff disappear behind your back.