From bf051054b621109aa4e064ec4045f4ce0e521066 Mon Sep 17 00:00:00 2001 From: Misty De Meo Date: Sun, 17 Jun 2012 16:54:20 -0500 Subject: link: add --force and --dry-run options `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 #11811. Signed-off-by: Misty De Meo --- Library/Homebrew/extend/pathname.rb | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'Library/Homebrew/extend') diff --git a/Library/Homebrew/extend/pathname.rb b/Library/Homebrew/extend/pathname.rb index 600e114a6..946ea0d49 100644 --- a/Library/Homebrew/extend/pathname.rb +++ b/Library/Homebrew/extend/pathname.rb @@ -347,6 +347,11 @@ class Pathname raise <<-EOS.undent Could not symlink file: #{src.expand_path} Target #{self} already exists. You may need to delete it. + To force the link and delete this file, do: + brew link -f formula_name + + To list all files that would be deleted: + brew link -n formula_name EOS elsif !dirname.writable? raise <<-EOS.undent -- cgit v1.2.3