diff options
author | André Arko <andre@arko.net> | 2016-02-08 12:24:41 +1100 |
---|---|---|
committer | André Arko <andre@arko.net> | 2016-02-08 12:24:41 +1100 |
commit | a753d0182e6d4d91d7e401e40482c6cec5baadae (patch) | |
tree | 6c73290bf6c0c1e06fdc05dc575f06114efdc806 /lib | |
parent | 8b18c86b22e3f910257dd39fbb34b583529559ef (diff) | |
parent | cb29f676c16cb2eab36b7dc3f22caea0754f9e74 (diff) | |
download | bundler-a753d0182e6d4d91d7e401e40482c6cec5baadae.tar.gz |
Merge pull request #4283 from RochesterinNYC/improve-error-message-invalid-gemspec-for-dependency
Add helpful invalid gemspec error message for `bundle install --standalone`
Diffstat (limited to 'lib')
-rw-r--r-- | lib/bundler/installer/standalone.rb | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/lib/bundler/installer/standalone.rb b/lib/bundler/installer/standalone.rb index 69cfbfc455..41fe207756 100644 --- a/lib/bundler/installer/standalone.rb +++ b/lib/bundler/installer/standalone.rb @@ -44,6 +44,9 @@ module Bundler def gem_path(path, spec) full_path = Pathname.new(path).absolute? ? path : File.join(spec.full_gem_path, path) Pathname.new(full_path).relative_path_from(Bundler.root.join(bundler_path)).to_s + rescue TypeError + error_message = "#{spec.name} #{spec.version} has an invalid gemspec" + raise Gem::InvalidSpecificationException.new(error_message) end end end |