Skip to content

Commit

Permalink
fix: rtx project was renamed to mise (#1048)
Browse files Browse the repository at this point in the history
* fix: rtx project was renamed to mise

* chore: keep rtx compatibility
  • Loading branch information
robsonpeixoto committed Jan 3, 2024
1 parent 46c8766 commit 62415f9
Show file tree
Hide file tree
Showing 4 changed files with 47 additions and 19 deletions.
19 changes: 14 additions & 5 deletions apps/elixir_ls_utils/priv/launch.sh
Original file line number Diff line number Diff line change
Expand Up @@ -42,14 +42,23 @@ then
. "${asdf_vm}"
else
>&2 echo "ASDF not found"
>&2 echo "Looking for rtx executable"
>&2 echo "Looking for mise executable"

if which rtx >/dev/null
if which mise >/dev/null
then
>&2 echo "rtx executable found in $(which rtx), activating"
eval "$($(which rtx) activate "$preferred_shell")"
>&2 echo "mise executable found in $(which mise), activating"
eval "$($(which mise) activate "$preferred_shell")"
else
>&2 echo "rtx not found"
>&2 echo "mise not found"
>&2 echo "Looking for rtx executable"

if which rtx >/dev/null
then
>&2 echo "rtx executable found in $(which rtx), activating"
eval "$($(which rtx) activate "$preferred_shell")"
else
>&2 echo "rtx not found"
fi
fi
fi

Expand Down
6 changes: 3 additions & 3 deletions guides/incomplete-installation.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
Incomplete installations is a frequent cause of ElixirLS failures. Generally
this is resolved by:

* Installing elixir and erlang via [ASDF](https://github.com/asdf-vm/asdf) or [RTX](https://github.com/jdx/rtx)
* Installing elixir and erlang via [ASDF](https://github.com/asdf-vm/asdf) or [MISE](https://github.com/jdx/mise)
(recommended)
* Installing a full version of Erlang/OTP via the package manager

Expand All @@ -16,7 +16,7 @@ installed. For Ubuntu this can be fixed by running
sudo apt-get install erlang erlang-dialyzer
```

or installing Elixir and Erlang via [ASDF](https://github.com/asdf-vm/asdf) or [RTX](https://github.com/jdx/rtx)
or installing Elixir and Erlang via [ASDF](https://github.com/asdf-vm/asdf) or [MISE](https://github.com/jdx/mise)

Relevant issue: https://github.com/elixir-lsp/vscode-elixir-ls/issues/134

Expand All @@ -29,6 +29,6 @@ installed. For fedora this can be fixed by running
sudo dnf install erlang erlang-edoc
```

or installing Elixir and Erlang via [ASDF](https://github.com/asdf-vm/asdf) or [RTX](https://github.com/jdx/rtx)
or installing Elixir and Erlang via [ASDF](https://github.com/asdf-vm/asdf) or [MISE](https://github.com/jdx/mise)

Relevant issue: https://github.com/elixir-lsp/elixir-ls/issues/431
22 changes: 16 additions & 6 deletions scripts/launch.fish
Original file line number Diff line number Diff line change
Expand Up @@ -21,15 +21,25 @@ if test -f "$asdf_vm"
source "$asdf_vm"
else
echo "ASDF not found" >&2
echo "Looking for rtx executable" >&2
echo "Looking for mise executable" >&2

set rtx (which rtx)
if test -n "$rtx"
echo "rtx executable found in $rtx, activating" >&2
set mise (which mise)
if test -n "$mise"
echo "mise executable found in $mise, activating" >&2

"$rtx" env -s fish | source
"$mise" env -s fish | source
else
echo "rtx not found" >&2
echo "mise not found" >&2
echo "Looking for rtx executable" >&2

set rtx (which rtx)
if test -n "$rtx"
echo "rtx executable found in $rtx, activating" >&2

"$rtx" env -s fish | source
else
echo "rtx not found" >&2
end
end
end

Expand Down
19 changes: 14 additions & 5 deletions scripts/launch.sh
Original file line number Diff line number Diff line change
Expand Up @@ -48,14 +48,23 @@ then
. "${asdf_vm}"
else
>&2 echo "ASDF not found"
>&2 echo "Looking for rtx executable"
>&2 echo "Looking for mise executable"

if which rtx >/dev/null
if which mise >/dev/null
then
>&2 echo "rtx executable found in $(which rtx), activating"
eval "$($(which rtx) env -s "$preferred_shell")"
>&2 echo "mise executable found in $(which mise), activating"
eval "$($(which mise) env -s "$preferred_shell")"
else
>&2 echo "rtx not found"
>&2 echo "mise not found"
>&2 echo "Looking for rtx executable"

if which rtx >/dev/null
then
>&2 echo "rtx executable found in $(which rtx), activating"
eval "$($(which rtx) env -s "$preferred_shell")"
else
>&2 echo "rtx not found"
fi
fi
fi

Expand Down

0 comments on commit 62415f9

Please sign in to comment.