Uploaded image for project: 'Puppet Development Kit'
  1. Puppet Development Kit
  2. PDK-1073

PATH setup seems to be incomplete for `pdk bundle exec`

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Normal
    • Resolution: Fixed
    • Affects Version/s: PDK 1.6.0
    • Fix Version/s: PDK 1.6.1
    • Component/s: None
    • Environment:

      Packaged installation of PDK

    • Template:
    • Acceptance Criteria:
      • `pdk bundle exec` invocations can access binaries from the PDK shared gem cache
    • Team:
      Puppet Developer Experience
    • Method Found:
      Customer Feedback
    • Release Notes:
      Bug Fix
    • Release Notes Summary:
      Fixed an issue where PDK subprocesses did not have the correct PATH environment. This issue would manifest as a "command not found" error when trying to use `pdk bundle exec` to run a command from a PDK-bundled Ruby gem such as `rspec`.
    • QA Risk Assessment:
      Needs Assessment

      Description

      When running `pdk bundle exec` the PATH in the resulting execution environment does not correctly point to the "bin" directory of the PDK shared gem cache:

      $ pdk bundle exec env
      ...snip...
      PATH=/root/.pdk/cache/ruby/2.4.0/bin:/opt/puppetlabs/pdk/private/ruby/2.4.4/bin:/opt/puppetlabs/pdk/private/ruby/2.4.4/lib/ruby/gems/2.4.0:/opt/puppetlabs/pdk/share/cache/ruby/2.4.0:/opt/puppetlabs/pdk/private/puppet/ruby/2.4.0/bin:/opt/puppetlabs/pdk/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/root/bin:/opt/puppetlabs/pdk/private/git/bin
      

      Specifically it appears that "/opt/puppetlabs/pdk/share/cache/ruby/2.4.0" should be "/opt/puppetlabs/pdk/share/cache/ruby/2.4.0*/bin*".

      This results in not being able to `pdk bundle exec` things that are included in the shared PDK gem cache:

      $ pdk bundle exec rspec
      pdk (INFO): Using Ruby 2.4.4
      pdk (INFO): Using Puppet 5.5.2
      bundler: command not found: rspec
      Install missing gem executables with `bundle install`

      See also https://github.com/puppetlabs/pdk/issues/535

        Attachments

          Activity

            jsd-sla-details-panel

              People

              • Assignee:
                jesse Jesse Scott
                Reporter:
                jesse Jesse Scott
              • Votes:
                0 Vote for this issue
                Watchers:
                1 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved:

                  Zendesk Support