diff options
author | Lamont Granquist <lamont@scriptkiddie.org> | 2017-04-05 10:30:04 -0700 |
---|---|---|
committer | Lamont Granquist <lamont@scriptkiddie.org> | 2017-04-06 10:02:47 -0700 |
commit | 37710fb769b320f877c206bd66ea52baa9c70c35 (patch) | |
tree | 7859de7a362e35bec03cfcba674ea30d2e808feb | |
parent | f910fcf3ba405e47902947cfc45e3aa278ec5134 (diff) | |
download | chef-37710fb769b320f877c206bd66ea52baa9c70c35.tar.gz |
try Path on windows
Signed-off-by: Lamont Granquist <lamont@scriptkiddie.org>
-rw-r--r-- | lib/chef/mixin/shell_out.rb | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/lib/chef/mixin/shell_out.rb b/lib/chef/mixin/shell_out.rb index 1bcf6d8861..e7d90a760a 100644 --- a/lib/chef/mixin/shell_out.rb +++ b/lib/chef/mixin/shell_out.rb @@ -109,8 +109,16 @@ class Chef "LC_ALL" => Chef::Config[:internal_locale], "LANGUAGE" => Chef::Config[:internal_locale], "LANG" => Chef::Config[:internal_locale], - "PATH" => sanitized_path, }.update(options[env_key] || {}) + if Chef::Platform.windows? + options[env_key] = { + "Path" => sanitized_path, + }.update(options[env_key] || {}) + else + options[env_key] = { + "PATH" => sanitized_path, + }.update(options[env_key] || {}) + end shell_out_command(*args, **options) end |