Details
-
Bug
-
Status: Closed
-
Normal
-
Resolution: Fixed
-
PDK 1.6.0
-
None
-
Packaged installation of PDK
-
- `pdk bundle exec` invocations can access binaries from the PDK shared gem cache
-
Puppet Developer Experience
-
Customer Feedback
-
Bug Fix
-
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`.
-
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`
|