elixir-lsp / elixir-ls

A frontend-independent IDE "smartness" server for Elixir. Implements the "Language Server Protocol" standard and provides debugger support via the "Debug Adapter Protocol"
https://elixir-lsp.github.io/elixir-ls/
Apache License 2.0
1.5k stars 196 forks source link

Fix directory issue with `fish` launch script #1015

Closed jaminthorns closed 1 year ago

jaminthorns commented 1 year ago

Fish doesn't have subshells, so cding within a command substitution will change the current working directory. When a directory-based version manager like asdf or rtx is used, the change in cwd could cause a different version of Elixir to run than that of the project. This fixes that potential issue by saving the current directory before calling the readlink_f function.

lukaszsamson commented 1 year ago

@jaminthorns Please add a comment why this is needed.

jaminthorns commented 1 year ago

@lukaszsamson Added a comment. Let me know if any additional detail is needed or if wording needs to be modified.

lukaszsamson commented 1 year ago

All good now. Thanks