diff options
author | Adam Edwards <adamed@opscode.com> | 2014-01-10 21:32:35 -0800 |
---|---|---|
committer | adamedx <adamed@opscode.com> | 2014-01-13 12:32:40 -0800 |
commit | cfd8410a12c68498af39de4e8551263e97dce18e (patch) | |
tree | 93f148a4dc7f9e679e8d8bd08ec839ad57249d32 /lib | |
parent | 3a99ebf69ed76cd48365061a2dc5d057be0d2456 (diff) | |
download | chef-cfd8410a12c68498af39de4e8551263e97dce18e.tar.gz |
Make conditional more concise with ternary operator per CR feedback.
Diffstat (limited to 'lib')
-rw-r--r-- | lib/chef/provider/group/windows.rb | 8 |
1 files changed, 1 insertions, 7 deletions
diff --git a/lib/chef/provider/group/windows.rb b/lib/chef/provider/group/windows.rb index 84c800c57e..c9c3da29e0 100644 --- a/lib/chef/provider/group/windows.rb +++ b/lib/chef/provider/group/windows.rb @@ -87,15 +87,9 @@ class Chef end def local_group_name_to_sid(group_name) - if ! group_name.include?("\\") - locally_qualified_name = "#{ENV['COMPUTERNAME']}\\#{group_name}" - else - locally_qualified_name = group_name - end - + locally_qualified_name = group_name.include?("\\") ? group_name : "#{ENV['COMPUTERNAME']}\\#{group_name}" Chef::ReservedNames::Win32::Security.lookup_account_name(locally_qualified_name)[1].to_s end - end end end |