summaryrefslogtreecommitdiff
path: root/lib/bundler/cli/pristine.rb
diff options
context:
space:
mode:
Diffstat (limited to 'lib/bundler/cli/pristine.rb')
-rw-r--r--lib/bundler/cli/pristine.rb6
1 files changed, 5 insertions, 1 deletions
diff --git a/lib/bundler/cli/pristine.rb b/lib/bundler/cli/pristine.rb
index cfd4a995a3..f463f0bce8 100644
--- a/lib/bundler/cli/pristine.rb
+++ b/lib/bundler/cli/pristine.rb
@@ -11,6 +11,7 @@ module Bundler
definition = Bundler.definition
definition.validate_runtime!
installer = Bundler::Installer.new(Bundler.root, definition)
+ git_sources = []
ProcessLock.lock do
installed_specs = definition.specs.reject do |spec|
@@ -41,6 +42,9 @@ module Bundler
end
FileUtils.rm_rf spec.extension_dir
FileUtils.rm_rf spec.full_gem_path
+
+ next if git_sources.include?(source)
+ git_sources << source
else
Bundler.ui.warn("Cannot pristine #{gem_name}. Gem is sourced from local path.")
next
@@ -49,7 +53,7 @@ module Bundler
true
end.map(&:name)
- jobs = installer.send(:installation_parallelization)
+ jobs = Bundler.settings.installation_parallelization
pristine_count = definition.specs.count - installed_specs.count
# allow a pristining a single gem to skip the parallel worker
jobs = [jobs, pristine_count].min