简体   繁体   中英

Getting an error "cd: '/Users/x/Downloads/' is a rotten symlink" in Fish shell

Today I logged onto my machine and tried to cd ~/Downloads , but my shell (Fish) just returns the error cd: '/Users/x/Downloads/' is a rotten symlink without any further information.

It seems to originate from Fish's builtin_cd function call here , however I can't tell what the reason is since my Downloads directory is not symlinked.

I'm able to cd into any other directory just fine and I'm able to access Downloads through MacOS's UI (Finder) so I don't think the directory data has been corrupted.

Does anyone know what the cause of this error could be and/or how to fix it?

edit: I've already tried reinstalling Fish from my package manager (homebrew), to no avail.

Your terminal app is forbidden from accessing the Downloads directory. You can fix it like so:

  1. Open Security and Privacy preference pane
  2. Click on the Privacy tab
  3. Select "Files and Folders" in the side bar
  4. Find your terminal app, and ensure that the Downloads directory is checked for it

You'll have to relaunch the terminal before it can get access.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM