diff options
author | Samuel Giddins <segiddins@segiddins.me> | 2018-02-03 13:11:32 -0800 |
---|---|---|
committer | Samuel Giddins <segiddins@segiddins.me> | 2018-02-03 13:11:32 -0800 |
commit | caf0c872a30232a5db890ad27b3af71f6a7d4081 (patch) | |
tree | a92e9a2723844b98b1063781ce9661fb18335c61 /lib/bundler/spec_set.rb | |
parent | 468f2f172084e5474a18645d7e82ad5ebfdf1b67 (diff) | |
download | bundler-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.rb | 5 |
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 |