summaryrefslogtreecommitdiff
path: root/lib/chef/provider/user/dscl.rb
diff options
context:
space:
mode:
author007lva <007.lva@gmail.com>2020-09-24 23:08:12 +0200
committer007lva <007.lva@gmail.com>2020-09-24 23:08:52 +0200
commit6ecacec32423b116e64fdcc11be0e8e18ce94706 (patch)
treeea00b3aa4389335922f42b6e22aa6921f64ad070 /lib/chef/provider/user/dscl.rb
parenta1e8747af72cf91a7b5a729db647e158f46ad01f (diff)
downloadchef-6ecacec32423b116e64fdcc11be0e8e18ce94706.tar.gz
Use Ruby 2.6 endless Range syntax
Signed-off-by: Luigi <007.lva@gmail.com>
Diffstat (limited to 'lib/chef/provider/user/dscl.rb')
-rw-r--r--lib/chef/provider/user/dscl.rb4
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/chef/provider/user/dscl.rb b/lib/chef/provider/user/dscl.rb
index 2a7300c017..7b266b8d62 100644
--- a/lib/chef/provider/user/dscl.rb
+++ b/lib/chef/provider/user/dscl.rb
@@ -584,7 +584,7 @@ in 'password', with the associated 'salt' and 'iterations'.")
#
def run_dscl(*args)
- result = shell_out("dscl", ".", "-#{args[0]}", args[1..-1])
+ result = shell_out("dscl", ".", "-#{args[0]}", args[1..])
return "" if ( args.first =~ /^delete/ ) && ( result.exitstatus != 0 )
raise(Chef::Exceptions::DsclCommandFailed, "dscl error: #{result.inspect}") unless result.exitstatus == 0
raise(Chef::Exceptions::DsclCommandFailed, "dscl error: #{result.inspect}") if result.stdout.include?("No such key: ")
@@ -593,7 +593,7 @@ in 'password', with the associated 'salt' and 'iterations'.")
end
def run_plutil(*args)
- result = shell_out("plutil", "-#{args[0]}", args[1..-1])
+ result = shell_out("plutil", "-#{args[0]}", args[1..])
raise(Chef::Exceptions::PlistUtilCommandFailed, "plutil error: #{result.inspect}") unless result.exitstatus == 0
if result.stdout.encoding == Encoding::ASCII_8BIT