diff options
| author | Tim D. Smith | 2016-03-15 23:40:59 -0700 |
|---|---|---|
| committer | Xu Cheng | 2016-03-19 19:14:50 +0800 |
| commit | f30c264519afd98b5aac8dd5c48810c761983124 (patch) | |
| tree | 9de2cb1f4ae644ed0117cf3b135a266259edc29b /Library | |
| parent | 4516375db417d1aa4e00a7acb61d63b9a94c8fbd (diff) | |
| download | brew-f30c264519afd98b5aac8dd5c48810c761983124.tar.bz2 | |
Avoid pathological trailing slash
Resolves an issue where xcode-select output with a terminal slash leads
to superenv failing to strip system library paths from ccld-style
invocations.
Fixes Homebrew/homebrew#49731. Discussion in Homebrew/homebrew#50154.
Diffstat (limited to 'Library')
| -rw-r--r-- | Library/Homebrew/os/mac/xcode.rb | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/Library/Homebrew/os/mac/xcode.rb b/Library/Homebrew/os/mac/xcode.rb index 4980fde3d..b8643aa6d 100644 --- a/Library/Homebrew/os/mac/xcode.rb +++ b/Library/Homebrew/os/mac/xcode.rb @@ -43,7 +43,8 @@ module OS path = bundle_path path.join("Contents", "Developer") if path else - Pathname.new(dir) + # Use cleanpath to avoid pathological trailing slash + Pathname.new(dir).cleanpath end end end |
