summaryrefslogtreecommitdiff
path: root/lib/chef/util
diff options
context:
space:
mode:
Diffstat (limited to 'lib/chef/util')
-rw-r--r--lib/chef/util/windows/net_group.rb7
1 files changed, 4 insertions, 3 deletions
diff --git a/lib/chef/util/windows/net_group.rb b/lib/chef/util/windows/net_group.rb
index 24ee29257c..9e7d3cbc36 100644
--- a/lib/chef/util/windows/net_group.rb
+++ b/lib/chef/util/windows/net_group.rb
@@ -101,9 +101,10 @@ class Chef::Util::Windows::NetGroup < Chef::Util::Windows
end
def local_delete
- rc = NetLocalGroupDel.call(nil, @name)
- if rc != NERR_Success
- raise ArgumentError, get_last_error(rc)
+ begin
+ Chef::ReservedNames::Win32::NetUser::net_local_group_del(nil, @groupname)
+ rescue Chef::Exceptions::Win32APIError => e
+ raise ArgumentError, e
end
end
end