Issue #16019 has been updated by Daniel Pittman.

Status changed from In Topic Branch Pending Review to Merged - Pending Release
Target version changed from 2.7.x to 2.7.20

I merged this as-is, but feel like I should note: we add those directories on 
Unix because there have been real-world cases where the environment didn't 
provide them to us.  It seems like it would be better to do the same on 
Windows, too, just in case you are in an odd environment or something else 
strange happens.  A separate push would do for that, though.
----------------------------------------
Bug #16019: Don't add /usr/sbin and /sbin to puppet's path on Windows
https://projects.puppetlabs.com/issues/16019#change-70309

Author: Josh Cooper
Status: Merged - Pending Release
Priority: Normal
Assignee: Josh Cooper
Category: exec
Target version: 2.7.20
Affected Puppet version: 2.7.6
Keywords: windows exec path shell
Branch: https://github.com/puppetlabs/puppet/pull/1091


/usr/sbin and /sbin should not be added to Puppet's shell search path on 
Windows:

<pre>
    :path => {:default => "none",
      ...
      :hook => proc do |value|
        ...
        %w{/usr/sbin /sbin}.each do |path|
          ENV["PATH"] += File::PATH_SEPARATOR + path unless paths.include?(path)
        end
        value
      end
</pre>

Either we should skip that on Windows or do the equivalent, e.g. 
ENV['SYSTEMROOT']\system32, ENV['SYSTEMROOT'], ENV['SYSTEMROOT'\system32\wbem. 
Also need to consider sysnative on 64-bit OSes.


-- 
You have received this notification because you have either subscribed to it, 
or are involved in it.
To change your notification preferences, please click here: 
http://projects.puppetlabs.com/my/account

-- 
You received this message because you are subscribed to the Google Groups 
"Puppet Bugs" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/puppet-bugs?hl=en.

Reply via email to