Skip to content

fix(expert): omit scrubbed env vars instead of setting to empty string#699

Open
jollyjerr wants to merge 1 commit into
expert-lsp:mainfrom
jollyjerr:fix/scrub-env-vars-by-omission
Open

fix(expert): omit scrubbed env vars instead of setting to empty string#699
jollyjerr wants to merge 1 commit into
expert-lsp:mainfrom
jollyjerr:fix/scrub-env-vars-by-omission

Conversation

@jollyjerr
Copy link
Copy Markdown

@jollyjerr jollyjerr commented May 28, 2026

Hello expert team 👋🏼 this PR fixes an issue I have been encountering after this pr using this setup:

ide: neovim v0.12.0
expert install method: build from source with `just release`
language version manager: mise

When launching neovim in a project directory, expert will crash with:

LSP[expert] [my-project] Failed to start engine my-project::24676988: {:error, "Failed to determine Elixir/OTP runtime for project: Runtime terminating during boot ({'cannot get bootfile','/Users/me/cod
e/opensource/expert/apps/expert/_build/prod/rel/plain/bin/start.boot'})\r\n\r\nCrash dump is being written to: erl_crash.dump...done (status 1)"}

I believe this is happening because we are passing ROOTDIR="" to erlexec here so we are skipping this logic

Example of bug
ERLEXEC=~/.local/share/mise/installs/erlang/26.2.5.15/erts-14.2.5.11/bin/erlexec
BINDIR=~/.local/share/mise/installs/erlang/26.2.5.15/erts-14.2.5.11/bin

env -i HOME="$HOME" PATH="$PATH" BINDIR="$BINDIR" "$ERLEXEC" -noshell -eval 'halt().' 2>&1; echo "exit: $?"

# prints exit: 0

env -i HOME="$HOME" PATH="$PATH" ROOTDIR="" BINDIR="$BINDIR" "$ERLEXEC" -noshell -eval 'halt().' 2>&1; echo "exit: $?"

# prints
# Runtime terminating during boot ({'cannot get bootfile','/bin/start.boot'})
# Crash dump is being written to: erl_crash.dump...done
# exit: 1

By omitting @scrubbed_env_vars entirely, I was able to get expert working again with my setup.

I believe this will also be the fix for #637

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant