diff options
author | fatkodima <fatkodima123@gmail.com> | 2019-11-06 00:52:25 +0200 |
---|---|---|
committer | fatkodima <fatkodima123@gmail.com> | 2019-11-06 00:53:01 +0200 |
commit | e77bc666db3c6193f8ff9f8cf7b2572ced2092ab (patch) | |
tree | dfff2cd8ad32a8c9c75b745b07b25439c83b39b5 /lib | |
parent | bf7df421ee6311fcc17e6dc46d204236f33b4b3f (diff) | |
download | bundler-e77bc666db3c6193f8ff9f8cf7b2572ced2092ab.tar.gz |
Ignore local overrides for bundle pristine
Diffstat (limited to 'lib')
-rw-r--r-- | lib/bundler/cli/pristine.rb | 5 | ||||
-rw-r--r-- | lib/bundler/source/git.rb | 8 |
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 |