From 45454b9dc3e02cb04a4b0e4d743b649f8541f620 Mon Sep 17 00:00:00 2001 From: elliottcable Date: Tue, 10 Sep 2013 10:06:52 -0500 Subject: [PATCH] (- fix revert) Re-add existence-check for ~/Applications This reverts commit d42410c97d91487ba2230952f3731c3ee48446a5. --- Library/Contributions/cmd/brew-linkapps.rb | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/Library/Contributions/cmd/brew-linkapps.rb b/Library/Contributions/cmd/brew-linkapps.rb index 2c11edb81737..571aedc7312b 100755 --- a/Library/Contributions/cmd/brew-linkapps.rb +++ b/Library/Contributions/cmd/brew-linkapps.rb @@ -3,6 +3,12 @@ TARGET_DIR = ARGV.include?("--local") ? File.expand_path("~/Applications") : "/Applications" +unless File.exist? TARGET_DIR + opoo "#{TARGET_DIR} does not exist, stopping." + puts "Run `mkdir #{TARGET_DIR}` first." + exit 1 +end + HOMEBREW_CELLAR.subdirs.each do |rack| kegs = rack.subdirs.map { |d| Keg.new(d) } next if kegs.empty?