We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent f193b06 commit 032afb3Copy full SHA for 032afb3
1 file changed
Gemfile
@@ -4,7 +4,17 @@ def location_for(place)
4
if place =~ /^((?:git[:@]|https:)[^#]*)#(.*)/
5
[{ :git => $1, :branch => $2, :require => false }]
6
elsif place =~ /^file:\/\/(.*)/
7
- ['>= 0', { :path => File.expand_path($1), :require => false }]
+ raw_path = $1
8
+
9
+ expanded_path =
10
+ if Gem.win_platform?
11
+ normalized = raw_path.sub(%r{^/([A-Za-z]:/)}, '\1')
12
+ File.expand_path(normalized).tr('\\', '/')
13
+ else
14
+ File.expand_path(raw_path)
15
+ end
16
17
+ ['>= 0', { :path => expanded_path, :require => false }]
18
else
19
[place, { :require => false }]
20
end
0 commit comments