Merge pull request #19818 from Homebrew/fix-trash
cask/artifact/abstract_uninstall: fix `trash_paths`
This commit is contained in:
commit
cecbb4350e
@ -464,9 +464,9 @@ module Cask
|
|||||||
args: paths,
|
args: paths,
|
||||||
print_stderr: Homebrew::EnvConfig.developer?
|
print_stderr: Homebrew::EnvConfig.developer?
|
||||||
|
|
||||||
trashed, _, untrashable = stdout.partition("\n")
|
trashed, = stdout.partition("\n")
|
||||||
trashed = trashed.split(":")
|
trashed = trashed.split(":") & paths
|
||||||
untrashable = untrashable.split(":")
|
untrashable = paths - trashed
|
||||||
|
|
||||||
trashed_with_permissions, untrashable = untrashable.partition do |path|
|
trashed_with_permissions, untrashable = untrashable.partition do |path|
|
||||||
Utils.gain_permissions(path, ["-R"], SystemCommand) do
|
Utils.gain_permissions(path, ["-R"], SystemCommand) do
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user