summaryrefslogtreecommitdiff
path: root/lib/bundler/definition.rb
diff options
context:
space:
mode:
authorBundlerbot <bot@bundler.io>2019-09-04 16:20:09 +0000
committerHiroshi SHIBATA <hsbt@ruby-lang.org>2019-09-18 18:26:33 +0900
commit434af7303ceed8ee5318a31eb7da02b0ed557965 (patch)
tree502831ecc463565f19dfda2761f0f09941669e32 /lib/bundler/definition.rb
parente6ad9452b6cf1cf118ead0cbd0cf86e2c0fb61e0 (diff)
[bundler/bundler] 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) https://github.com/bundler/bundler/commit/3766053507
Diffstat (limited to 'lib/bundler/definition.rb')
-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