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