[PDK-1073] PATH setup seems to be incomplete for `pdk bundle exec` Created: 2018/07/12  Updated: 2018/07/26  Resolved: 2018/07/16

Status: Closed
Project: Puppet Development Kit
Component/s: None
Affects Version/s: PDK 1.6.0
Fix Version/s: PDK 1.6.1

Type: Bug Priority: Normal
Reporter: Jesse Scott Assignee: Jesse Scott
Resolution: Fixed Votes: 0
Labels: resolved-issue-added
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Packaged installation of PDK

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


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

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

Generated at Sun May 31 20:45:17 PDT 2020 using Jira 8.5.2#805002-sha1:a66f9354b9e12ac788984e5d84669c903a370049.