diff options
| author | Jack Nagel | 2013-11-21 14:50:35 -0600 |
|---|---|---|
| committer | Jack Nagel | 2013-11-21 17:17:55 -0600 |
| commit | a40a0e1862b134f5282eb4487444566ac7fb88ba (patch) | |
| tree | eafd76bc7f1b19893a83da039636207b6314db37 /Library/ENV/4.3 | |
| parent | 8c613e618b6a2205981baa6017075a65ecc6c04e (diff) | |
| download | brew-a40a0e1862b134f5282eb4487444566ac7fb88ba.tar.bz2 | |
Remove some monkeypatches
Diffstat (limited to 'Library/ENV/4.3')
| -rwxr-xr-x | Library/ENV/4.3/cc | 2 | ||||
| -rwxr-xr-x | Library/ENV/4.3/xcrun | 10 |
2 files changed, 7 insertions, 5 deletions
diff --git a/Library/ENV/4.3/cc b/Library/ENV/4.3/cc index 9172d3cea..7a40d2e38 100755 --- a/Library/ENV/4.3/cc +++ b/Library/ENV/4.3/cc @@ -40,7 +40,7 @@ end class Cmd def initialize path, args - @arg0 = path.basename.freeze + @arg0 = File.basename(path).freeze @args = args.freeze end def mode diff --git a/Library/ENV/4.3/xcrun b/Library/ENV/4.3/xcrun index 16600e240..6921bb3c4 100755 --- a/Library/ENV/4.3/xcrun +++ b/Library/ENV/4.3/xcrun @@ -4,19 +4,21 @@ # But many build-systems expect it to work. This fixes that. # NOTE only works if the build-tool calls xcrun without a path prefixed! -require "#{File.dirname __FILE__}/../libsuperenv" -SUPERBIN = __FILE__.dirname.cleanpath.freeze +dirname = File.dirname(__FILE__) +require "#{dirname}/../libsuperenv" +SUPERBIN = dirname.cleanpath.freeze # Some build tools are stupid and still set DEVELOPER_DIR to old /Developer ENV['DEVELOPER_DIR'] = ENV['HOMEBREW_DEVELOPER_DIR'] exec "/usr/bin/xcrun", *ARGV if ARGV.empty? or ARGV[0][0..0] == '-' if File.exist?("/usr/bin/#{ARGV.first}") - exec "/usr/bin/#{ARGV.shift}", *ARGV unless ENV['HOMEBREW_SDKROOT'].directory? + sdkroot = ENV['HOMEBREW_SDKROOT'] + exec "/usr/bin/#{ARGV.shift}", *ARGV unless sdkroot and File.directory? sdkroot end def try path - exec path, *ARGV if File.executable?(path) and path.cleanpath.dirname != SUPERBIN + exec path, *ARGV if File.executable?(path) and File.dirname(path.cleanpath) != SUPERBIN end arg0 = ARGV.shift |
