aboutsummaryrefslogtreecommitdiffstats
path: root/Library
diff options
context:
space:
mode:
authorTim D. Smith2016-03-15 23:40:59 -0700
committerXu Cheng2016-03-19 19:14:50 +0800
commitf30c264519afd98b5aac8dd5c48810c761983124 (patch)
tree9de2cb1f4ae644ed0117cf3b135a266259edc29b /Library
parent4516375db417d1aa4e00a7acb61d63b9a94c8fbd (diff)
downloadbrew-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.rb3
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