summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorBundlerbot <bot@bundler.io>2019-09-04 16:20:09 +0000
committerDavid Rodríguez <deivid.rodriguez@riseup.net>2019-09-15 09:42:46 +0200
commit3766053507348eb2b274adcdbc7fa8e02b2579a9 (patch)
tree91fec1fa2e84edbc1e80b1dfdf06b50af3e95aff /lib
parentf70fb0193f066b2d5b8507233055e9cfbb4cb8b9 (diff)
downloadbundler-3766053507348eb2b274adcdbc7fa8e02b2579a9.tar.gz
Merge #7340
7340: Fix bundle clean issue r=deivid-rodriguez a=deivid-rodriguez ### What was the end-user problem that led to this PR? The problem was that `bundle clean` is crashing under some conditions. ### What was your diagnosis of the problem? My diagnosis was that sometimes (when the bundle includes git sourced gems with extensions), it assumes that some paths exist, but they don't. ### What is your fix for the problem, implemented in this PR? My fix is to ignore those paths. ### Why did you choose this fix out of the possible options? I chose this fix because it fixes the issue. Fixes #7338. Co-authored-by: David Rodríguez <deivid.rodriguez@riseup.net> (cherry picked from commit b007fde67c77c1f15f13b97eda186644c2a2be04)
Diffstat (limited to 'lib')
-rw-r--r--lib/bundler/definition.rb2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/bundler/definition.rb b/lib/bundler/definition.rb
index 01ee86a358..d6fbb0b5b7 100644
--- a/lib/bundler/definition.rb
+++ b/lib/bundler/definition.rb
@@ -317,7 +317,7 @@ module Bundler
end
def spec_git_paths
- sources.git_sources.map {|s| File.realpath(s.path) }
+ sources.git_sources.map {|s| File.realpath(s.path) if File.exist?(s.path) }.compact
end
def groups