# util: Fix \`failed to load env variables\` on Windows when users have custom terminal shell args \(\#51787\) · gitcafe/zed

[View on GitCafe](https://git.cafe/gitcafe/zed/commit/4eb7ae8108004e286181ecd64a86f92b9877a27b)

Repository: [gitcafe/zed](https://git.cafe/gitcafe/zed)

Visibility: public

Requested revision: 4eb7ae8108004e286181ecd64a86f92b9877a27b

Requested commit: 4eb7ae8108004e286181ecd64a86f92b9877a27b

Commit: 4eb7ae8108004e286181ecd64a86f92b9877a27b

Tree: 3daafc52a6c28c04dd756f346bedb677d03ea464

Author: Amaan

Committer: GitHub

## Message

```
util: Fix `failed to load env variables` on Windows when users have custom terminal shell args  (#51787)

Closes #46933 

Before you mark this PR as ready for review, make sure that you have:
- [x] Added a solid test coverage and/or screenshots from doing manual
testing
- [x] Done a self-review taking into account security and performance
aspects
- [x] NO UI CHANGES


Release Notes:
- Fixed `Failed to load shell environment` errors on Windows when users
have custom terminal shell arguments configured (e.g., cmd.exe with `/k
echo Hello` or similar startup commands)
```

## Parents

- [ffbfff3e17af2e5485cbb98b122c5277d9e0b69f](https://git.cafe/gitcafe/zed/commit/ffbfff3e17af2e5485cbb98b122c5277d9e0b69f?format=markdown)

[Source at this commit](https://git.cafe/gitcafe/zed/tree/4eb7ae8108004e286181ecd64a86f92b9877a27b?format=markdown)
