# terminal: Resolve env based on the project dir on the target \(\#41867\) · gitcafe/zed

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

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

Visibility: public

Requested revision: ca5a4dcffad44893db2d9d0dbf6b7d51e4f9a2f0

Requested commit: ca5a4dcffad44893db2d9d0dbf6b7d51e4f9a2f0

Commit: ca5a4dcffad44893db2d9d0dbf6b7d51e4f9a2f0

Tree: 9315aa851444368b15c7d7ece0a858842800d523

Author: Jakub Konka

Committer: GitHub

## Message

```
terminal: Resolve env based on the project dir on the target (#41867)

Prior to this change we would always resolve envs when spawning a new
terminal window based on the inherited CLI environment. This works fine
as long as we open a new Zed instance in the terminal when using it
locally only. When using Zed connected to a remote server, it would not
be meaningful however. WIth this change, we correctly ping the remote
for the project-local envs and use that instead. This change should also
fix a pesky issue when updating Zed - after Zed restarts, opening a new
terminal window will not run `direnv` for example.

Release Notes:

- N/A
```

## Parents

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

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