binstubs shouldn't appbundle if they're running under bundler
lamont-granquist opened this issue · 2 comments
lamont-granquist commented
Trying to launch kitchen off a bundle using chef-dk:
$ bundle exec kitchen list
/opt/chefdk/embedded/lib/ruby/gems/2.4.0/gems/bundler-1.15.1/lib/bundler/rubygems_integration.rb:377:in `block (2 levels) in replace_gem': activesupport is not part of the bundle. Add it to your Gemfile. (Gem::LoadError)
from /opt/chefdk/bin/kitchen:8:in `<main>'
That is caused by the appbundle -- chef-dk 2.x makes this worse since it pins the world, but chef-dk 1.x had the same behavior.
To run out of the bundle correctly:
$ bundle exec /opt/chefdk/embedded/bin/kitchen list
We could probably detect via BUNDLE_*
env vars that we're being launched under a bundle and bypass appbundling since appbundling within a bundle is crossing the streams and will never work.
Even with the refactoring that I want to do of what goes into /opt/chefdk/embedded/bin and what goes into /opt/chefdk/bin the appbundle'd binstubs should always come first in the PATH, so this will
always be a problem.
lamont-granquist commented
So that failed, see #42
lamont-granquist commented
#43 fixed this a long time ago.