From 677340382b41e2dae0e605a6e4184142de87d570 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Carlos=20A=CC=81lvaro?= Date: Thu, 1 Feb 2024 14:27:39 +0100 Subject: [PATCH] fix: Replace system_command! by system_command --- Casks/salt.rb | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/Casks/salt.rb b/Casks/salt.rb index b706ce7..1a9fff8 100644 --- a/Casks/salt.rb +++ b/Casks/salt.rb @@ -23,7 +23,7 @@ random_str = (0...8).map { rand(65..90).chr }.join %w[api master minion syndic].each do |daemon| plist_file = "/Library/LaunchDaemons/com.saltstack.salt.#{daemon}.plist" - xml, = system_command! "plutil", + xml, = system_command "plutil", args: ["-convert", "xml1", "-o", "-", "--", plist_file], sudo: true xml = Plist.parse_xml(xml) @@ -38,13 +38,13 @@ new_plist_file = "/tmp/#{random_str}.#{File.basename(plist_file)}" File.write(new_plist_file, xml.to_plist) - system_command! "plutil", + system_command "plutil", args: ["-lint", new_plist_file] - system_command! "mv", + system_command "mv", args: [new_plist_file, plist_file], sudo: true - system_command! "chown", + system_command "chown", args: ["root:wheel", plist_file], sudo: true end