Permalink
Browse files

Use realpath to follow symlinks (important for homebrew).

  • Loading branch information...
1 parent 25b4054 commit f11524500742fe5274d3d30328e4ea0a2e9f8fa1 @hammerdr committed May 8, 2012
Showing with 3 additions and 1 deletion.
  1. +3 −1 lib/pindah.rb
View
4 lib/pindah.rb
@@ -3,6 +3,7 @@
require "tempfile"
require "pp"
require "erb"
+require "pathname"
begin
require 'ant'
@@ -22,7 +23,8 @@ class << self
def self.infer_sdk_location(path)
tools = path.split(File::PATH_SEPARATOR).detect {|p| File.exists?("#{p}/android") || File.exists?("#{p}/android.bat") }
abort "\"android\" executable not found on $PATH" if tools.nil?
- File.expand_path("#{tools}/..")
+ real_location = Pathname.new("#{tools}/android").realpath.dirname
+ File.expand_path("#{real_location}/..")
end
DEFAULTS = { :output => File.expand_path("bin"),

0 comments on commit f115245

Please sign in to comment.