Skip to content

util: Fix env load issues on Windows due to quoting#50782

Merged
Veykril merged 4 commits intozed-industries:mainfrom
AmaanBilwar:fix/env-load-issue-on-windows
Mar 5, 2026
Merged

util: Fix env load issues on Windows due to quoting#50782
Veykril merged 4 commits intozed-industries:mainfrom
AmaanBilwar:fix/env-load-issue-on-windows

Conversation

@AmaanBilwar
Copy link
Copy Markdown
Contributor

Closes #47823

Before you mark this PR as ready for review, make sure that you have:

  • Added a solid test coverage and/or screenshots from doing manual testing
  • Done a self-review taking into account security and performance aspects
  • No UI changes

Release Notes:

  • Solves the issue where env variables failed to load when a project with dir path had '(single quote) in them, for example: C:\Temp\O'Brien\project_1.
  • added a zed pre-quote for directory paths and zed executable
  • handled pwsh, nushell, cmd, fish, posix, csh, tcsh, rc, xonsh, elvish based terminals
  • uses try_quote for quoting shell paths

@cla-bot cla-bot bot added the cla-signed The user has signed the Contributor License Agreement label Mar 5, 2026
@zed-community-bot zed-community-bot bot added the first contribution the author's first pull request to Zed. NOTE: the label application is automated via github actions label Mar 5, 2026
@AmaanBilwar
Copy link
Copy Markdown
Contributor Author

@yeskunall let me know if anything needs to be handled better, fixed etc

Copy link
Copy Markdown
Member

@Veykril Veykril left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks!

@Veykril Veykril changed the title Fix/env load issue on windows util: Fix env load issues on Windows due to quoting Mar 5, 2026
@Veykril Veykril enabled auto-merge (squash) March 5, 2026 08:23
@Veykril Veykril merged commit c091c90 into zed-industries:main Mar 5, 2026
39 checks passed
@yeskunall
Copy link
Copy Markdown
Member

Thanks for working on this @AmaanBilwar and congratulations on your first contribution to Zed! 💖 (keep ’em coming!)

@esthertrapadoux esthertrapadoux moved this to Shipped by the Guild in Zed Guild - The Board Mar 6, 2026
@zelenenka zelenenka added the guild Pull requests by someone in Zed Guild. NOTE: the label application is automated via github actions label Mar 16, 2026
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 first contribution the author's first pull request to Zed. NOTE: the label application is automated via github actions guild Pull requests by someone in Zed Guild. NOTE: the label application is automated via github actions

Projects

Status: Shipped by the Guild

Development

Successfully merging this pull request may close these issues.

"Failed to load environment variables" when ' symbol in project path

5 participants