summaryrefslogtreecommitdiffhomepage
path: root/lib
diff options
context:
space:
mode:
Diffstat (limited to 'lib')
-rw-r--r--lib/mruby/build/load_gems.rb8
1 files changed, 5 insertions, 3 deletions
diff --git a/lib/mruby/build/load_gems.rb b/lib/mruby/build/load_gems.rb
index b48df6510..723be6ffc 100644
--- a/lib/mruby/build/load_gems.rb
+++ b/lib/mruby/build/load_gems.rb
@@ -76,9 +76,6 @@ module MRuby
if params[:core]
gemdir = "#{root}/mrbgems/#{params[:core]}"
- elsif params[:path]
- require 'pathname'
- gemdir = Pathname.new(params[:path]).absolute? ? params[:path] : "#{root}/#{params[:path]}"
elsif params[:git]
url = params[:git]
gemdir = "#{gem_clone_dir}/#{url.match(/([-\w]+)(\.[-\w]+|)$/).to_a[1]}"
@@ -108,6 +105,11 @@ module MRuby
# Jump to the top of the branch
git.run_checkout gemdir, branch if $pull_gems
end
+
+ gemdir << "/#{params[:path]}" if params[:path]
+ elsif params[:path]
+ require 'pathname'
+ gemdir = Pathname.new(params[:path]).absolute? ? params[:path] : "#{root}/#{params[:path]}"
else
fail "unknown gem option #{params}"
end