sindresorhus/trash-cli

`sudo trash` still has no permission

Open

#28 aberto em 13 de jan. de 2020

Ver no GitHub
 (6 comments) (0 reactions) (0 assignees)JavaScript (39 forks)user submission
bughelp wanted

Métricas do repositório

Stars
 (1.403 stars)
Métricas de merge de PR
 (Nenhuma PRs mesclada em 30d)

Description

I'm on macOS 10.15.2

Create

❯ sudo mkdir /Users/wow

❯ sudo mkdir /Users/wow
mkdir: /Users/wow: File exists # ✅ 

Delete with trash

❯ trash /Users/wow
Error: Command failed: /usr/local/lib/node_modules/trash-cli/node_modules/trash/lib/macos-trash /Users/wow
“wow” couldn’t be moved to the trash because you don’t have permission to access it.

❯ sudo trash /Users/wow
Error: Command failed: /usr/local/lib/node_modules/trash-cli/node_modules/trash/lib/macos-trash /Users/wow
“wow” couldn’t be moved to the trash because you don’t have permission to access it.

Delete with rm

❯ sudo rm -rf /Users/wow

❯ test -d /Users/wow || echo 'no folder'
no folder

Guia do colaborador