Skip to content

Commit 032afb3

Browse files
Update gemfile for msys2
1 parent f193b06 commit 032afb3

1 file changed

Lines changed: 11 additions & 1 deletion

File tree

Gemfile

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,17 @@ 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+
File.expand_path(normalized).tr('\\', '/')
13+
else
14+
File.expand_path(raw_path)
15+
end
16+
17+
['>= 0', { :path => expanded_path, :require => false }]
818
else
919
[place, { :require => false }]
1020
end

0 commit comments

Comments
 (0)