We hoped that FOO=bar bst true would have been enough to run true
with FOO=bar in its environment, but this is in fact lacking in two
aspects.
First, this is only possible from a shell -- programs that execve bst
had to just pass the desired environment, but this ends up being less
clear when inspecting running bst processes since it is not part of the
process command line.
Second, for a few select environment variables, overriding their value
from the outside results in some behavioral change and general
annoyance: For instance, PATH=/bin bst true typically does not work if
bst isn't installed in /bin.
This commit addresses this by allowing users to pass VAR=value before
the executable name to override specific environment variables, in the
same manner as /usr/bin/env. A --no-env switch is also there if clearing
the environment of the spacetime process is desirable.
We hoped that
FOO=bar bst true
would have been enough to runtrue
with FOO=bar in its environment, but this is in fact lacking in two aspects.First, this is only possible from a shell -- programs that execve bst had to just pass the desired environment, but this ends up being less clear when inspecting running bst processes since it is not part of the process command line.
Second, for a few select environment variables, overriding their value from the outside results in some behavioral change and general annoyance: For instance,
PATH=/bin bst true
typically does not work if bst isn't installed in /bin.This commit addresses this by allowing users to pass VAR=value before the executable name to override specific environment variables, in the same manner as /usr/bin/env. A --no-env switch is also there if clearing the environment of the spacetime process is desirable.