sindresorhus/trash-cli

`sudo trash` still has no permission

Ouverte

#28 ouverte le 13 janv. 2020

 (6 commentaires) (0 réaction) (0 personne assignée)JavaScript (39 forks)user submission
bughelp wanted

Métriques du dépôt

Stars
 (1 403 étoiles)
Métriques de merge PR
 (Aucune PR mergée en 30 j)

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

Guide contributeur