Closed wolfsage closed 6 months ago
--env-var was added as a way to set env vars for tests that had to run as forks off of an already preloaded process when it was too late to set them the normal way. When launching a preload you can just do MY_ENV_VAR=XXX yath start ...
and --env-var is not needed. But since tests run off of a preload are forked from the preloaded process, not the yath start
process, --env-var was added to provide a way to set env vars in that case.
That said, I suspect yath 2.0 (not released yet, but in progress) "fixes" this anyway, --env-var probably works for yath start
with the way it has been re-written.
Works for me, thanks. Just surprising until I figured out what was going on! :)
Maybe this is intentional, but
yath test
's--env-var
does not apply before--preload
s are loaded. This makes it hard to change things on the fly when using preloads and--env-var
.