Skip to content

Conversation

@imumesh18
Copy link
Contributor

@imumesh18 imumesh18 commented Jun 6, 2025

Add user-friendly error messages and permission prompt logic when opening files or folders fails due to macOS privacy restrictions from zed cli.

Screenshot 2025-06-06 at 1 13 32 PM

Closes #5138

Tested Platform:

  • Macos

Haven't tested this on linux or windows as don't have access to it to verify if this broke something.

Release Notes:

  • Show permission prompt when opening file using zed cli on macos

@cla-bot cla-bot bot added the cla-signed The user has signed the Contributor License Agreement label Jun 6, 2025
@maxdeviant maxdeviant changed the title macos: Show permission prompt when opening file using zed cli Show permission prompt when opening file using zed CLI on macOS Jun 8, 2025
@maxdeviant maxdeviant changed the title Show permission prompt when opening file using zed CLI on macOS Show permission prompt when opening file using Zed CLI on macOS Jun 8, 2025
@imumesh18 imumesh18 force-pushed the push-rtsnrrwuwkzs branch 2 times, most recently from 01f0dfa to df28b27 Compare June 22, 2025 15:19
@imumesh18 imumesh18 force-pushed the push-rtsnrrwuwkzs branch from df28b27 to 19213ac Compare June 22, 2025 15:31
@notpeter notpeter self-assigned this Aug 6, 2025
@notpeter notpeter removed their assignment Sep 22, 2025
@ConradIrwin
Copy link
Member

@imumesh18 Thank you for this change, and sorry for the awfully slow reply.

I think we should do something like this.

I was trying to test your branch out, but I was unable to get the new dialog to show.

I have set up my macOS settings so that iTerm is not allowed permission to open the Documents folder:

Screenshot 2025-09-29 at 13 36 55

I then built a new version of zed (via cargo run zed).

I then tried to open the file with cargo run -p cli -- --zed ./target/debug/zed ~/Documents/desktop.ini

I see the error message on the command line:

error opening "/Users/conrad/Documents/desktop.ini": error opening "/Users/conrad/Documents/desktop.ini": Operation not permitted (os error 1)

but the UI is just blank:

Screenshot 2025-09-29 at 13 37 46

I'm not sure if this is because I'm on macOS Tahoe, or because other recent changes to file loading are conflicting in a subtle way (e.g. #36764).

Do you have any ideas?

@imumesh18
Copy link
Contributor Author

Hey @ConradIrwin let me test this again and see if Something has changed in zed or macos tahoe. I tested this with macos sequoia so not sure why it's not working. Will update you once I find something.

@ConradIrwin
Copy link
Member

Closing for now to keep my backlog clean; but I am happy to try and get something like this merged

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

cla-signed The user has signed the Contributor License Agreement

Projects

None yet

Development

Successfully merging this pull request may close these issues.

desktop macOS security permission

3 participants