-
Notifications
You must be signed in to change notification settings - Fork 890
Description
Describe the Bug
I set the elixir and erlang plugins to "system" in the parent directory. When I try to run "iex -S mix" iex fails to start. If the plugins are set to versions managed by asdf, iex starts normally and executes the mix.exs script
Steps to Reproduce
- % asdf set -u erlang system
- % asdf set -u elixir system
- cd to any directory with an elixir project having a mix.exs file and no local .tools-version
- % iex -S mix
Expected Behaviour
iex should have started correctly. It does if asdf managed versions are set:
% asdf set -u erlang 28.0.1
% asdf set -u elixir 1.18.4-otp-28
% iex -S mix
Erlang/OTP 28 [erts-16.0.1] [source] [64-bit] [smp:10:10] [ds:10:10:10] [async-threads:1] [jit]
Interactive Elixir (1.18.4) - press Ctrl+C to exit (type h() ENTER for help)
iex(1)>
Actual Behaviour
With erlang and elixir set to system, there's an error and iex doesn't start:
% iex -S mix
Erlang/OTP 28 [erts-16.0.1] [source] [64-bit] [smp:10:10] [ds:10:10:10] [async-threads:1] [jit] [dtrace]
** (SyntaxError) invalid syntax found on /Users/mpchase/.asdf/shims/mix:4:22:
error: syntax error before: "$@"
│
4 │ exec asdf exec "mix" "$@"
│ ^
│
└─ /Users/mpchase/.asdf/shims/mix:4:22
(elixir 1.18.4) lib/code.ex:1525: Code.require_file/2
Environment
OS:
Darwin 24.5.0 Darwin Kernel Version 24.5.0: Tue Apr 22 19:54:49 PDT 2025; root:xnu-11417.121.6~2/RELEASE_ARM64_T6000 arm64
SHELL:
zsh 5.9 (arm64-apple-darwin24.0)
BASH VERSION:
3.2.57(1)-release
ASDF VERSION:
0.18.0 (revision unknown)
ASDF INTERNAL VARIABLES:
ASDF_TOOL_VERSIONS_FILENAME=.tool-versions
ASDF_DATA_DIR=/Users/mpchase/.asdf
ASDF_CONFIG_FILE=/Users/mpchase/.asdfrc
ASDF INSTALLED PLUGINS:
elixir https://github.com/asdf-vm/asdf-elixir.git
89098d5c31fd3a240a25b1dacf881a6eeed426c4
erlang https://github.com/asdf-vm/asdf-erlang.git
5f27baa62864bb433be9c7f2f7d69b475f534376
asdf plugins affected (if relevant)
% asdf list erlang
27.3.4
28.0.1
% asdf list elixir
1.18.4-otp-27
1.18.4-otp-28
% asdf current
Name Version Source Installed
elixir system /Users/mpchase/.tool-versions true
erlang system /Users/mpchase/.tool-versions true
iex is on my path:
% type -a iex
iex is /Users/mpchase/.asdf/shims/iex
iex is /opt/homebrew/bin/iex