Skip to content

Commit

Permalink
(- fix revert) Re-add existence-check for ~/Applications
Browse files Browse the repository at this point in the history
This reverts commit d42410c97d91487ba2230952f3731c3ee48446a5.
  • Loading branch information
ELLIOTTCABLE committed Sep 17, 2013
1 parent eb43e9a commit 45454b9
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions Library/Contributions/cmd/brew-linkapps.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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?
Expand Down

0 comments on commit 45454b9

Please sign in to comment.