summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEduardo Bautista <me@eduardobautista.com>2015-07-30 12:24:13 -0500
committerEduardo Bautista <me@eduardobautista.com>2015-07-30 12:24:13 -0500
commit5f2d983fc909290599d04f4cd414334552add172 (patch)
tree3e5c742254db4c99c4171d0acd56ac378d43f38f
parent58b6757f601b3660ca6258b5afca0798ff1f7aea (diff)
downloadbundler-5f2d983fc909290599d04f4cd414334552add172.tar.gz
Print a warning when a gem can't be cached due to a missing source
-rw-r--r--lib/bundler/source/rubygems.rb6
1 files changed, 5 insertions, 1 deletions
diff --git a/lib/bundler/source/rubygems.rb b/lib/bundler/source/rubygems.rb
index d15362b9aa..a9b10f5936 100644
--- a/lib/bundler/source/rubygems.rb
+++ b/lib/bundler/source/rubygems.rb
@@ -189,7 +189,11 @@ module Bundler
cached_path = cached_path(spec)
if cached_path.nil?
remote_spec = remote_specs.search(spec).first
- cached_path = fetch_gem(remote_spec)
+ if remote_spec
+ cached_path = fetch_gem(remote_spec)
+ else
+ Bundler.ui.warn "#{spec.full_name} is built in to Ruby, and can't be cached because your Gemfile doesn't have any sources that contain it."
+ end
end
cached_path
end