lib/autoproj/package_managers/bundler_manager.rb in autoproj-2.8.0 vs lib/autoproj/package_managers/bundler_manager.rb in autoproj-2.8.1
- old
+ new
@@ -49,11 +49,11 @@
gemfile_path = File.join(ws.prefix_dir, 'gems', 'Gemfile')
if File.file?(gemfile_path)
env.set('BUNDLE_GEMFILE', gemfile_path)
end
- Autobuild.programs['bundler'] = File.join(ws.dot_autoproj_dir, 'bin', 'bundler')
+ Autobuild.programs['bundler'] = File.join(ws.dot_autoproj_dir, 'bin', 'bundle')
env.init_from_env 'RUBYLIB'
env.inherit 'RUBYLIB'
# Sanitize the rubylib we get from the environment by removing
# anything that comes from Gem or Bundler
@@ -361,10 +361,13 @@
Autoproj.warn "saved the new Gemfile in #{gemfile_path}.FAILED and restored the last Gemfile version"
FileUtils.cp gemfile_path, "#{gemfile_path}.FAILED"
backup_restore(backups)
raise
ensure
- FileUtils.rm_f File.join(binstubs_path, 'bundler') if binstubs_path
+ if binstubs_path
+ FileUtils.rm_f File.join(binstubs_path, 'bundle')
+ FileUtils.rm_f File.join(binstubs_path, 'bundler')
+ end
backup_clean(backups)
end
def discover_rubylib
require 'bundler'