summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorBundlerbot <bot@bundler.io>2019-11-09 10:56:35 +0000
committerBundlerbot <bot@bundler.io>2019-11-09 10:56:35 +0000
commitcfacb05ed43db03a5214d85baed0ed3231550920 (patch)
tree88643ace58eb7f1b24d1c39346150bb7b51968d3 /lib
parent03e08a01e897a10e2b8143f59026443c0a7b5adc (diff)
parente77bc666db3c6193f8ff9f8cf7b2572ced2092ab (diff)
downloadbundler-cfacb05ed43db03a5214d85baed0ed3231550920.tar.gz
Merge #7423
7423: Ignore local overrides for bundle pristine r=deivid-rodriguez a=fatkodima Closes #6836 Co-authored-by: fatkodima <fatkodima123@gmail.com>
Diffstat (limited to 'lib')
-rw-r--r--lib/bundler/cli/pristine.rb5
-rw-r--r--lib/bundler/source/git.rb8
2 files changed, 9 insertions, 4 deletions
diff --git a/lib/bundler/cli/pristine.rb b/lib/bundler/cli/pristine.rb
index 532b3e0b5b..53da90b415 100644
--- a/lib/bundler/cli/pristine.rb
+++ b/lib/bundler/cli/pristine.rb
@@ -29,6 +29,11 @@ module Bundler
FileUtils.rm_rf spec.full_gem_path
when Source::Git
+ if source.local?
+ Bundler.ui.warn("Cannot pristine #{gem_name}. Gem is locally overriden.")
+ next
+ end
+
source.remote!
if extension_cache_path = source.extension_cache_path(spec)
FileUtils.rm_rf extension_cache_path
diff --git a/lib/bundler/source/git.rb b/lib/bundler/source/git.rb
index 736f5bb546..ab997ec47c 100644
--- a/lib/bundler/source/git.rb
+++ b/lib/bundler/source/git.rb
@@ -230,6 +230,10 @@ module Bundler
@allow_remote || @allow_cached
end
+ def local?
+ @local
+ end
+
private
def serialize_gemspecs_in(destination)
@@ -256,10 +260,6 @@ module Bundler
cached_revision && super
end
- def local?
- @local
- end
-
def requires_checkout?
allow_git_ops? && !local? && !cached_revision_checked_out?
end