diff options
author | Tim Smith <tsmith84@gmail.com> | 2020-02-25 15:27:41 -0800 |
---|---|---|
committer | Tim Smith <tsmith84@gmail.com> | 2020-02-25 16:16:01 -0800 |
commit | e2968314865bd51114dbcea3cb7c41d67d416120 (patch) | |
tree | 5aad263fe1d7cbde5cf0ab79fa23549ddbdbbede | |
parent | 63633cc1ddfbf79ff77e97376184e2d27b954678 (diff) | |
download | chef-e2968314865bd51114dbcea3cb7c41d67d416120.tar.gz |
Accept exit code 3010 as valid in windows_package
This just means a reboot is necessary. A lot of people struggle with this and then eventually set the return code. We should just do that by default like we do in windows_feature already.
Signed-off-by: Tim Smith <tsmith@chef.io>
-rw-r--r-- | lib/chef/resource/windows_package.rb | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/lib/chef/resource/windows_package.rb b/lib/chef/resource/windows_package.rb index 3402cb0792..9fac482f9b 100644 --- a/lib/chef/resource/windows_package.rb +++ b/lib/chef/resource/windows_package.rb @@ -55,9 +55,11 @@ class Chef description: "The amount of time (in seconds) to wait before timing out." # In the past we accepted return code 127 for an unknown reason and 42 because of a bug - property :returns, [ String, Integer, Array ], default: [ 0 ], + # we accept 3010 which means success, but a reboot is necessary + property :returns, [ String, Integer, Array ], default: [ 0, 3010 ], desired_state: false, - description: "A comma-delimited list of return codes that indicate the success or failure of the package command that was run." + description: "A comma-delimited list of return codes that indicate the success or failure of the package command that was run.", + default_description: "0 (success) and 3010 (success where a reboot is necessary)" property :source, String, coerce: (proc do |s| |