Skip to content

Commit 8101fd1

Browse files
authored
use ASDF_DIR variable to support Homebrew installs (#428)
Currently the `launch.sh` script will check for asdf in my home directory. As I am a Homebrew user, my asdf got installed to `/usr/local/opt/asdf`. For `launch.sh` to be able to detect it I've modified it for the use of `ASDF_DIR` if available and fall-back to the current behaviour if that's not set. asdf will set the [`ASDF_DIR` (see upstream source)][1] variable when it initializes, so this seems to be a reliable way to detect all sorts of customized asdf installations. [1]: https://github.com/asdf-vm/asdf/blob/master/asdf.sh#L14
1 parent 63d10b3 commit 8101fd1

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

apps/elixir_ls_utils/priv/launch.sh

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,9 @@
1111

1212
did_relaunch=$1
1313

14-
asdf_vm="${HOME}/.asdf/asdf.sh"
14+
ASDF_DIR=${ASDF_DIR:-"${HOME}/.asdf"}
15+
16+
asdf_vm="${ASDF_DIR}/asdf.sh"
1517
if test -f "${asdf_vm}"
1618
then
1719
# asdf-vm does not support the plain posix shell. Figure out

0 commit comments

Comments
 (0)