# Make the Yarn SDK path relative to the worktree \(\#40062\) · gitcafe/zed

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

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

Visibility: public

Requested revision: 36210e72af5e5c480775ddd83e9d31afec1cc52b

Requested commit: 36210e72af5e5c480775ddd83e9d31afec1cc52b

Commit: 36210e72af5e5c480775ddd83e9d31afec1cc52b

Tree: d77f9faccf1b4461e458c7bd08971e1b965dc551

Author: Maël Nison

Committer: GitHub

## Message

````
Make the Yarn SDK path relative to the worktree (#40062)

Let's say you run this:

```
cd ~/proj-a
zed ~/proj-b
```

The `zed` process will execute with `current_dir() = ~/proj-a`, but a
`worktree_root_path() = ~/proj-b`. The old detection was then checking
if the Yarn SDK was installed in `proj-a` to decide whether to set the
tsdk value or not. This was incorrect, as we should instead check for
the SDK presence inside `proj-b`.

Release Notes:

- Fixed the Yarn SDK detection when the Zed pwd is different from the
opened folder.
````

## Parents

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

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