summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEduardo Bautista <me@eduardobautista.com>2015-07-30 12:24:13 -0500
committerAndre Arko <andre@arko.net>2015-08-01 17:55:10 -0700
commitf4942051e73909b0d51ad2ed02140734e2b3c697 (patch)
treeb98ea767d57457c5cc439ce601a39b8f236915ac
parente872985f4f4988437e3f47efe18842513bd62452 (diff)
downloadbundler-spec-for-3896.tar.gz
Print a warning when a gem can't be cached due to a missing sourcespec-for-3896
-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