File tree Expand file tree Collapse file tree 1 file changed +7
-4
lines changed Expand file tree Collapse file tree 1 file changed +7
-4
lines changed Original file line number Diff line number Diff line change @@ -64,12 +64,15 @@ def remove_dependencies_and_sources(dependency)
6464 # This is used when an override has no options or a path is specified
6565 # This path is turned into an absolute path
6666 def expand_gem_path ( name , args , calling_file )
67- args << { :path => name } if args . empty?
68- return unless args . last . kind_of? ( Hash ) && args . last [ :path ]
67+ return unless args . empty? || args . last . kind_of? ( Hash ) && args . last [ :path ]
6968
69+ path = args . empty? ? name : args . last [ :path ]
7070 possible_paths = [ File . dirname ( calling_file ) ] + bundler_inject_gem_path
71- full_path = possible_paths . map { |p | File . expand_path ( args . last [ :path ] , p ) } . detect { |f | File . exist? ( f ) }
72- args . last [ :path ] = full_path if full_path
71+ full_path = possible_paths . map { |p | File . expand_path ( path , p ) } . detect { |f | File . exist? ( f ) }
72+ if full_path
73+ args << { } if args . empty?
74+ args . last [ :path ] = full_path
75+ end
7376 end
7477
7578 def extract_version_opts ( args )
You can’t perform that action at this time.
0 commit comments