summaryrefslogtreecommitdiff
path: root/lib/bundler/spec_set.rb
diff options
context:
space:
mode:
authorSamuel Giddins <segiddins@segiddins.me>2018-02-03 13:11:32 -0800
committerSamuel Giddins <segiddins@segiddins.me>2018-02-03 13:11:32 -0800
commitcaf0c872a30232a5db890ad27b3af71f6a7d4081 (patch)
treea92e9a2723844b98b1063781ce9661fb18335c61 /lib/bundler/spec_set.rb
parent468f2f172084e5474a18645d7e82ad5ebfdf1b67 (diff)
downloadbundler-caf0c872a30232a5db890ad27b3af71f6a7d4081.tar.gz
[SpecSet] Raise a more detailed error when the lockfile might be corrupted
Diffstat (limited to 'lib/bundler/spec_set.rb')
-rw-r--r--lib/bundler/spec_set.rb5
1 files changed, 4 insertions, 1 deletions
diff --git a/lib/bundler/spec_set.rb b/lib/bundler/spec_set.rb
index 4674936d39..e6c30603f0 100644
--- a/lib/bundler/spec_set.rb
+++ b/lib/bundler/spec_set.rb
@@ -38,7 +38,10 @@ module Bundler
elsif check
return false
elsif raise_on_missing
- raise "Unable to find a spec satisfying #{dep} in the set. Perhaps the lockfile is corrupted?"
+ others = lookup[dep.name] if match_current_platform
+ message = "Unable to find a spec satisfying #{dep} in the set. Perhaps the lockfile is corrupted?"
+ message += " Found #{others.join(", ")} that did not match the current platform." if others && !others.empty?
+ raise GemNotFound, message
end
end