-
Notifications
You must be signed in to change notification settings - Fork 16
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
trash: error -1701 #37
Comments
Try adding the calling script and/or the 'trash' binary to: System Preferences -> Security & Privacy -> Privacy -> Accessibility . |
After 15 days I decided to just install another |
@jprokos agreed, I started using https://github.com/morgant/tools-osx/blob/master/src/trash, it's much better: |
Came here with this problem. |
Thank you. ## EDIT [04-May-2022]
Hope this helps! |
I solved this for |
I solved the problem with the help of @gsbabil and @veloxo comments. I share my solution steps. In Sonoma 14.5, I use Tabby as a terminal app, but when I execute The following is how to request it manually. # Reset Automation permission for the bundle ID of the app currently at the frontmost (i.e., terminal app) to ensure the appearance of the permission request dialog.
tccutil reset AppleEvents "$(osascript -e 'id of app (path to frontmost application as text)')"
# Use the Finder application to get the name of the item in the trash (this opens a permission request dialog).
osascript -e 'tell application "Finder" to get name of items in trash' Finally, by allowing the request, I was able to successfully execute |
I am getting this error when calling a command in a script. The same command called in a shell doesn't receive the error.
Shell script being called by another shell script with "$1" being a single quoted path.
Result:
Command line
This results in the files being sent to the trash
The text was updated successfully, but these errors were encountered: