Commit 8e1bb3d
authored
fix: inherited PATH pollutes project environment (#298)
This is a followup to the discussion in #295.
To determine the correct value for PATH to start the engine build and
project node with, `Expert.Port.path_env_at_directory` starts a new
shell in the project directory. When doing so the server's own PATH
variable is inherited by that shell.
In the context of an Expert release built using `just release`, this
variable contains paths pointing to the release, including one
containing an `erl` executable. The surrounding directory structure does
not contain a `start.boot` file in the location `erl` expects.
On some systems (e.g. Debian) the new shell will set PATH to a
completely new value or prefix it with paths containing a complete
Erlang environment. On others (e.g. Arch, Fedora) the new shell will
only append defaults to the value, leaving the unwanted paths in place.
In the latter case Expert will launch `elixir`, which in turn launches
`erl`, which won't be able to find a `start.boot`-file and therefore
crash.
By providing the new shell an unset PATH it is fully responsible for
determining an appropriate value without being affected by the
environment of Expert.1 parent ae352b9 commit 8e1bb3d
1 file changed
+6
-2
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
89 | 89 | | |
90 | 90 | | |
91 | 91 | | |
92 | | - | |
93 | | - | |
| 92 | + | |
| 93 | + | |
| 94 | + | |
| 95 | + | |
| 96 | + | |
| 97 | + | |
94 | 98 | | |
95 | 99 | | |
96 | 100 | | |
| |||
0 commit comments