From a terminal, it is not possible to open a directory in the finder (this also affects "Reveal in Finder" in VS Code

After upgrading to 14.2.1, Finder is unable to open a directory. I used to be able to:


1) open a Terminal

2) type "open ~/Documents/my/path"

3) see a Finder window showing the content of the "path" directory


When I do that now, Finder always opens the home directory for the current user.


This also affects applications that allow the user to show a file in the Finder. For instance, there is a feature in Visual Studio Code where the user can select a file in the IDE and ask to "Reveal in Finder". This also opens the home directory for the current user.


Posted on Jan 12, 2024 9:50 PM

Reply
2 replies

Jan 14, 2024 12:06 PM in response to oliechti

Make sure the Terminal app has been given permission to access the Documents folder (also need special permission to access the Desktop & Downloads folder too. You may need to give Terminal Full Disk Access depending on what you else you may be doing.

Control access to files and folders on Mac - Apple Support


Unfortunately I cannot locate an actual Apple article regarding Full Disk Access, but the option is in the Privacy & Security System Settings location as well.



Jan 13, 2024 12:55 AM in response to oliechti

I cannot reproduce the open command in Terminal always opening the home directory when I tell it to:


open ~/Documents/_TeX
open ~/Documents/__WIP__/Developer
open ~/Library/Fonts
...


Each invocation opens a Finder Window on the designated folder location. I don't use Visual Studio Code, so cannot test that part of your post. Ensure you have the current version and if its Reveal in Finder only shows the home directory, then contact Microsoft as it is their code to fix.


Tested: Sonoma 14.2.1

This thread has been closed by the system or the community team. You may vote for any posts you find helpful, or search the Community for additional answers.

From a terminal, it is not possible to open a directory in the finder (this also affects "Reveal in Finder" in VS Code

Welcome to Apple Support Community
A forum where Apple customers help each other with their products. Get started with your Apple Account.