Move existence check into helper script
This way, it'll run as `root`, too.
This commit is contained in:
parent
7a22cda8dd
commit
aceb021254
@ -111,6 +111,10 @@ module Cask
|
||||
set -euo pipefail
|
||||
|
||||
for path in "${@}"; do
|
||||
if [[ ! -e "${path}" ]]; then
|
||||
continue
|
||||
fi
|
||||
|
||||
if [[ -e "${path}/.DS_Store" ]]; then
|
||||
/bin/rm -f "${path}/.DS_Store"
|
||||
fi
|
||||
@ -135,8 +139,6 @@ module Cask
|
||||
|
||||
sig { params(path: T.any(Pathname, T::Array[Pathname])).void }
|
||||
def rmdir(path)
|
||||
return unless path.exist?
|
||||
|
||||
@command.run!(
|
||||
"/usr/bin/xargs",
|
||||
args: ["-0", "--", "/bin/bash", "-c", RMDIR_SH, "--"],
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user