summaryrefslogtreecommitdiff
path: root/lib/chef/win32/error.rb
diff options
context:
space:
mode:
authorMatt Wrock <matt@mattwrock.com>2015-12-17 18:32:56 -0800
committerMatt Wrock <matt@mattwrock.com>2015-12-17 18:32:56 -0800
commit3bb52c0682797e716b7030ef0af6cb885e68cf25 (patch)
tree63dc36a77e563d4b743deef7c099de60932997b3 /lib/chef/win32/error.rb
parentb027f4b9cebda8314118a0839f93d812e1b6fcfa (diff)
downloadchef-service_user.tar.gz
fixes #3521 correcting format of user name passed to policy apis and does not clobber existing service rights of other usersservice_user
Diffstat (limited to 'lib/chef/win32/error.rb')
-rw-r--r--lib/chef/win32/error.rb3
1 files changed, 1 insertions, 2 deletions
diff --git a/lib/chef/win32/error.rb b/lib/chef/win32/error.rb
index 2175608eeb..c638773d2a 100644
--- a/lib/chef/win32/error.rb
+++ b/lib/chef/win32/error.rb
@@ -57,8 +57,7 @@ class Chef
# nil::: always returns nil when it does not raise
# === Raises
# Chef::Exceptions::Win32APIError:::
- def self.raise!(message = nil)
- code = get_last_error
+ def self.raise!(message = nil, code = get_last_error)
msg = format_message(code).strip
formatted_message = ""
formatted_message << message if message