summaryrefslogtreecommitdiff
path: root/lib/bundler/source
diff options
context:
space:
mode:
authorDavid Rodríguez <deivid.rodriguez@riseup.net>2021-08-18 09:58:51 +0200
committerHiroshi SHIBATA <hsbt@ruby-lang.org>2021-08-31 19:06:14 +0900
commit3683781f53cc22b9fa507e4a2848c30086fa7897 (patch)
tree82610caf483f7c852fb866bb2781bd516fe1fe14 /lib/bundler/source
parent71f6711351b89330f5445cef6f0a38618627ce66 (diff)
[rubygems/rubygems] Restore working `bundle check` behaviour
As part of a recent bug fix where bundler was accidentally hitting the network when not supposed to, I made some refactoring, and the commit I'm reverting here (https://github.com/rubygems/rubygems/commit/d74830d00bb541883377992f56818620a78930b0) was some cleanup that those refactorings allowed according to "past me". That was completely wrong, `bundle check` should never consider cached gems, only installed gems, so the code that was removed was necessary. https://github.com/rubygems/rubygems/commit/5483e98305
Notes
Notes: Merged: https://github.com/ruby/ruby/pull/4789
Diffstat (limited to 'lib/bundler/source')
-rw-r--r--lib/bundler/source/rubygems.rb6
1 files changed, 6 insertions, 0 deletions
diff --git a/lib/bundler/source/rubygems.rb b/lib/bundler/source/rubygems.rb
index 298ff98e24..2e0ecb1aa6 100644
--- a/lib/bundler/source/rubygems.rb
+++ b/lib/bundler/source/rubygems.rb
@@ -26,6 +26,12 @@ module Bundler
Array(options["remotes"]).reverse_each {|r| add_remote(r) }
end
+ def local_only!
+ @specs = nil
+ @allow_local = true
+ @allow_remote = false
+ end
+
def local!
return if @allow_local