lib/licensed/sources/bundler.rb in licensed-3.2.1 vs lib/licensed/sources/bundler.rb in licensed-3.2.2

- old
+ new

@@ -107,21 +107,25 @@ backup = ENV.to_hash ENV.replace(::Bundler.original_env) # reset bundler to load from the current app's source path ::Bundler.reset! - ::Bundler.load end + # ensure the bundler environment is loaded before enumeration + ::Bundler.load + yield end ensure if backup # restore bundler configuration ENV.replace(backup) ::Bundler.reset! - ::Bundler.load end + + # reload the bundler environment after enumeration + ::Bundler.load end # Returns whether the current licensed execution is running ruby-packer def ruby_packer? @ruby_packer ||= RbConfig::TOPDIR =~ /__enclose_io_memfs__/