summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorArtyom Khramov <futu.fata@gmail.com>2017-10-14 17:49:38 +0600
committerArtyom Khramov <futu.fata@gmail.com>2017-10-14 20:28:16 +0600
commit803200c01b663df8f11f18c7038c578939b9ed5d (patch)
tree41c66a1ad240dd4e414edba342c8426e46f349ba /lib
parentfea177f61df71121c6f9422a74b093e42c504388 (diff)
downloadbundler-803200c01b663df8f11f18c7038c578939b9ed5d.tar.gz
Fix doubled message in verbose mode
`Bundler::Definition#missing_specs?` clears the `@resolve` ivar due to the fact that `ensure` clause evaluates regardless whether exception occurred. That results in repeated resolution, and, therefore, in repeated debug messages. This change moves ivars clearing into the `rescue` clause, so `@resolve` will be cleared only in case when `BundlerError` occurs
Diffstat (limited to 'lib')
-rw-r--r--lib/bundler/definition.rb9
1 files changed, 4 insertions, 5 deletions
diff --git a/lib/bundler/definition.rb b/lib/bundler/definition.rb
index 4b9a781c82..930386afda 100644
--- a/lib/bundler/definition.rb
+++ b/lib/bundler/definition.rb
@@ -205,19 +205,18 @@ module Bundler
end
def missing_specs?
- missing = []
- resolve.materialize(requested_dependencies, missing)
+ missing = missing_specs
return false if missing.empty?
Bundler.ui.debug "The definition is missing #{missing.map(&:full_name)}"
true
rescue BundlerError => e
- Bundler.ui.debug "The definition is missing dependencies, failed to resolve & materialize locally (#{e})"
- true
- ensure
@index = nil
@resolve = nil
@specs = nil
@gem_version_promoter = nil
+
+ Bundler.ui.debug "The definition is missing dependencies, failed to resolve & materialize locally (#{e})"
+ true
end
def requested_specs