Skip to content

Commit 612d68f

Browse files
Update gemfile for msys2
1 parent f193b06 commit 612d68f

1 file changed

Lines changed: 8 additions & 2 deletions

File tree

Gemfile

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,16 @@
11
source ENV['GEM_SOURCE'] || 'https://rubygems.org'
22

3+
require 'uri'
4+
35
def location_for(place)
46
if place =~ /^((?:git[:@]|https:)[^#]*)#(.*)/
57
[{ :git => $1, :branch => $2, :require => false }]
6-
elsif place =~ /^file:\/\/(.*)/
7-
['>= 0', { :path => File.expand_path($1), :require => false }]
8+
elsif place.start_with?('file://')
9+
path = URI(place).path
10+
path = path.sub(%r{^/([A-Za-z]:/)}i, '\1')
11+
path = File.expand_path(path)
12+
13+
['>= 0', { path: path, require: false }]
814
else
915
[place, { :require => false }]
1016
end

0 commit comments

Comments
 (0)