# Fix rust-analyzer startup issue in single-file worktrees \(\#39441\) · gitcafe/zed

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

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

Visibility: public

Requested revision: f3abd1dab551626a581f184776ff6a9ac86df203

Requested commit: f3abd1dab551626a581f184776ff6a9ac86df203

Commit: f3abd1dab551626a581f184776ff6a9ac86df203

Tree: ba46be17aba70008989c4338e11cc22b80c38841

Author: Tim Vermeulen

Committer: GitHub

## Message

```
Fix rust-analyzer startup issue in single-file worktrees (#39441)

I'm not sure about the exact conditions for reproducing this issue, but
whenever I build Zed locally and have it open a single-file worktree on
launch, the rust-analyzer language server fails to start up because Zed
attempts to run `rust-analyzer --help` on a path that is not a
directory. This fixes that by running the command on the parent path in
the case of a single-file worktree.

Release Notes:

- Fixed rust-analyzer startup issue in single-file worktrees
```

## Parents

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

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