Details
-
Bug
-
Status: Resolved
-
Normal
-
Resolution: Fixed
-
None
-
Coremunity
-
Platform Core KANBAN
-
Bug Fix
-
Fixes a bug the prevented "puppet module install" from working on Windows when overriding the "module_working_dir" setting with a path containing backslashes, e.g. C:\modules
Description
If you override module_working_dir using a native windows path with backslashes, the PMT will fail to install the module, because it expects the path to contain forward slashes:
C:\work\puppet [stable +25 ~0 -0 !]> bundle exec puppet module install puppetlabs-stdlib --module_working_dir C:\Windows\Temp --debug
|
...
|
Error: Could not install package
|
Package attempted to install file into
|
"C:/Windows/Temp/cache/tmp-unpacker20150714-3276-hqzekd/puppetlabs-stdlib-4.6.0" under "C:\\Windows\\Temp/cache/tmp-unpacker20150714-3276-hqzekd".
|
Changing that to forward slashes works, including if the case doesn't match:
C:\work\puppet [stable +25 ~0 -0 !]> bundle exec puppet module install puppetlab
|
s-stdlib --module_working_dir C:/windows/temp --debug
|
...
|
Debug: Extracting: C:/windows/temp/cache/tmp-unpacker20150714-2640-1mynaxp/puppe
|
tlabs-stdlib-4.6.0/lib/facter/util/puppet_settings.rb
|
Notice: Installing -- do not interrupt ...
|
C:/ProgramData/PuppetLabs/code/modules
|
└── puppetlabs-stdlib (v4.6.0)
|
A simple fix would be to ensure we call File.expand_path on whatever value is specified, as that canonicalizes the path (from ruby's perspective):
C:\work\puppet [stable +25 ~0 -0 !]> irb
|
irb(main):001:0> File.expand_path('C:\Windows\Temp')
|
=> "C:/Windows/Temp"
|
Attachments
Issue Links
- relates to
-
PUP-4854 PMT fails to install modules on Windows that have long paths
-
- Closed
-