Skip to content

Commit 19bc436

Browse files
Update gemfile for msys2
1 parent f193b06 commit 19bc436

1 file changed

Lines changed: 12 additions & 1 deletion

File tree

Gemfile

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,18 @@ def location_for(place)
44
if place =~ /^((?:git[:@]|https:)[^#]*)#(.*)/
55
[{ :git => $1, :branch => $2, :require => false }]
66
elsif place =~ /^file:\/\/(.*)/
7-
['>= 0', { :path => File.expand_path($1), :require => false }]
7+
raw_path = $1
8+
9+
expanded_path =
10+
if Gem.win_platform?
11+
normalized = raw_path.sub(%r{^/([A-Za-z]:/)}, '\1')
12+
normalized = normalized.tr('/', '\\')
13+
File.expand_path(normalized)
14+
else
15+
File.expand_path(raw_path)
16+
end
17+
18+
['>= 0', { :path => expanded_path, :require => false }]
819
else
920
[place, { :require => false }]
1021
end

0 commit comments

Comments
 (0)