diff options
author | jugatsu <anton.jugatsu@gmail.com> | 2016-11-29 12:44:31 +0400 |
---|---|---|
committer | GitHub <noreply@github.com> | 2016-11-29 12:44:31 +0400 |
commit | 8bd5b66d5781948446c051793da06fbf63a542de (patch) | |
tree | 16cf349b0f10b214546e58281bdf8590bc76f2bf | |
parent | eb34e8c9ceaaa6d648be21ff353010e45769bdc8 (diff) | |
download | chef-8bd5b66d5781948446c051793da06fbf63a542de.tar.gz |
Add support to cab_package for non-English system locales
When using cap_package on Windows with non-English system locales, such as Russian, chef-client throws up an error:
undefined method `[]' for nil:NilClass
The reason is that dism.exe output is in russian language and therefore cannot be parsed.
This PR ensures that output of dism.exe will be always in English.
-rw-r--r-- | lib/chef/provider/package/cab.rb | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/chef/provider/package/cab.rb b/lib/chef/provider/package/cab.rb index 4e2054fbc2..8e1709f618 100644 --- a/lib/chef/provider/package/cab.rb +++ b/lib/chef/provider/package/cab.rb @@ -45,7 +45,7 @@ class Chef end def dism_command(command) - shellout = Mixlib::ShellOut.new("dism.exe /Online #{command} /NoRestart", { :timeout => @new_resource.timeout }) + shellout = Mixlib::ShellOut.new("dism.exe /Online /English #{command} /NoRestart", { :timeout => @new_resource.timeout }) with_os_architecture(nil) do shellout.run_command end |