capistrano / bundler

Bundler support for Capistrano 3.x
MIT License
219 stars 83 forks source link

`bundle check` succeeds when it should fail on gem updates #130

Closed kanmeiban closed 2 years ago

kanmeiban commented 2 years ago

It's more of an issue of bundler, still when updating a single gem bundle check succeeds while printing info about missing gem on STDERR. Fixed it with set :bundle_check_before_install, false. Maybe we should add a notice to the README?

From my capistrano.log:

 bundle check
 DEBUG [aae77348]       The following gems are missing
 * rugged (1.5.0.1)
 DEBUG [aae77348]       Install missing gems with `bundle install`
 DEBUG [aae77348] Finished in 1.202 seconds with exit status 0 (successful).
  INFO The Gemfile's dependencies are satisfied, skipping installation
mattbrictson commented 2 years ago

Strange! I doubt this is a bundler issue. I found one upstream bug report but that ultimately was found to be due to a shell alias for bundler and not a bug in bundler itself: https://github.com/rubygems/rubygems/issues/3233

Is it possible that bundle check is invoking an alias or wrapper script in your shell environment?

kanmeiban commented 2 years ago

@mattbrictson, you're absolutely right. I'm actually running bundle check in a wrapper script (envkey-source) and it clobbers the return value.