Details
-
Improvement
-
Status: Closed
-
Normal
-
Resolution: Fixed
-
None
-
None
-
Platform OS
-
Platform OS Kanban
-
Not Needed
-
Needs Assessment
Description
The Windows API supports setting a working directory when starting a process. However, Puppet does not currently allow setting this value programatically.
The win32-process gem can pass cwd supplied through it's argument hash - see code at https://github.com/djberg96/win32-process/blob/win32-process-0.7.5/lib/win32/process.rb#L681
Puppet currently uses Dir.chdir to set a working directory before creating a process - however, this might not always work properly on Windows. The cwd has File.directory?(dir) used to validate it, which could fail on UNC or other path types (like reparse points - i.e. symlinks) on Windows - meaning that Dir.chdir never gets called as expected.
The call to Process.create at https://github.com/puppetlabs/puppet/blob/master/lib/puppet/util/windows/process.rb#L12 should pass the arguments value through.
Attachments
Issue Links
- is blocked by
-
PUP-6919 Puppet::Util::Windows::Process.execute should accept a working directory
-
- Closed
-