Add support for uninstall/zap :trash
.
This commit is contained in:
parent
fc739bf82e
commit
b2daed584d
@ -224,9 +224,14 @@ module Hbc
|
|||||||
end
|
end
|
||||||
|
|
||||||
def uninstall_trash(*paths)
|
def uninstall_trash(*paths)
|
||||||
# :trash functionality is stubbed as a synonym for :delete
|
return if paths.empty?
|
||||||
# TODO: make :trash work differently, moving files to the Trash
|
|
||||||
uninstall_delete(*paths)
|
ohai "Trashing files:"
|
||||||
|
each_resolved_path(:trash, paths) do |path, resolved_paths|
|
||||||
|
puts path
|
||||||
|
resolved_paths.each { |resolved_path| Utils.gain_permissions(resolved_path, ["-R"], @command) }
|
||||||
|
@command.run!("/usr/bin/xargs", args: ["-0", "--", HOMEBREW_LIBRARY_PATH/"utils/trash.swift"], input: resolved_paths.join("\0"))
|
||||||
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
def uninstall_rmdir(*directories)
|
def uninstall_rmdir(*directories)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user