Skip to content

Commit

Permalink
(fixup) Fix Bundle CLI lazy load
Browse files Browse the repository at this point in the history
Previously the lazy loading of files missed the pdk/cli/exec classes.  This
commit updates the PDK CLI Bundle class to require the needed libraries.
  • Loading branch information
glennsarti committed Oct 3, 2019
1 parent 2f372c8 commit 7cd5c37
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion lib/pdk/cli/bundle.rb
Original file line number Diff line number Diff line change
Expand Up @@ -19,12 +19,15 @@ module PDK::CLI

PDK::CLI::Util.analytics_screen_view('bundle')

# Ensure that the correct Ruby is activated before running commend.
# Ensure that the correct Ruby is activated before running command.
puppet_env = PDK::CLI::Util.puppet_from_opts_or_env({})
PDK::Util::RubyVersion.use(puppet_env[:ruby_version])

gemfile_env = PDK::Util::Bundler::BundleHelper.gemfile_env(puppet_env[:gemset])

require 'pdk/cli/exec'
require 'pdk/cli/exec/interactive_command'

command = PDK::CLI::Exec::InteractiveCommand.new(PDK::CLI::Exec.bundle_bin, *args).tap do |c|
c.context = :pwd
c.update_environment(gemfile_env)
Expand Down

0 comments on commit 7cd5c37

Please sign in to comment.