|
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"
|
|