whenever
whenever copied to clipboard
`bundle_command` changes surprisingly when using a different Gemfile location
Hi :wave:
I had some fun yesterday debugging why my rake
commands in the schedule.rb
somehow yielded different results than before without having changed anything to whenever
.
It turns out, the bundle_command
default is determined like so:
https://github.com/javan/whenever/blob/0687268046eaede8f1369a70870e04d3c0c83897/lib/whenever/setup.rb#L26
..which is tied to:
https://github.com/javan/whenever/blob/0687268046eaede8f1369a70870e04d3c0c83897/lib/whenever.rb#L31-L33
Well. My seemingly unrelated change of the day was to move the Gemfile
into a different location (say something like Gemfile-ruby33
) and point the BUNDLE_GEMFILE
env variable to that location. That's not too common, but the standard way to do so (see https://bundler.io/v2.5/man/bundle-config.1.html#LIST-OF-AVAILABLE-KEYS and bundle config gemfile
)
I suggest to adjust Whenever#bundler?
in a way that works in that scenario as well.
Thanks!