# util: Fix shell kind in windows based on program path \(\#39696\) · gitcafe/zed

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

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

Visibility: public

Requested revision: 02bdba80a415770be720a72484eaae5a5cebfe71

Requested commit: 02bdba80a415770be720a72484eaae5a5cebfe71

Commit: 02bdba80a415770be720a72484eaae5a5cebfe71

Tree: 225112fc1efb9b57226f938f91e569dad0dff7fc

Author: Marco Mihai Condrache

Committer: GitHub

## Message

```
util: Fix shell kind in windows based on program path (#39696)

Closes #39614

The `ShellKind` struct is built on Windows' side, meaning that when
connecting to remotes, we fall back to PowerShell construction, even if
the shell program we are spawning is a unix program.

This broke tasks creation since we are using the shell kind to construct
args:


https://github.com/zed-industries/zed/blob/d04ac864b8cb78ee888ce03323e34c17a6dd16b9/crates/project/src/terminals.rs#L149

In normal terminals this only affected activation scripts (only place
where shell kind is used)

I don't have a Windows machine to test it, so I would appreciate any
help with testing!

Release Notes:

- Fixed an issue where tasks could not be executed in Windows WSL

---------

Signed-off-by: Marco Mihai Condrache <52580954+marcocondrache@users.noreply.github.com>
```

## Parents

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

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