Having to set env vars in each step is tedious
If I need run a program, foo
, in a scenario, and it needs a couple of environment variables set, e.g., HOME
and FOO_LOG
, I can do this with a step like this:
when I run env HOME=. FOO_LOG=debug foo`
However, this becomes tedious if I need to run the program many times in a scenario.
It would thus be nice to have a way for scenarios to set environment variables that are picked up with all runcmd
steps. Something like:
given environment HOME=.
given environment FOO_LOG=debug
when I run foo
...
~~~
An implementation idea: the steps would store the variables to set in memory (in Python, the "context"; in Rust, similarly), and whenever `lib/runcmd` runs a command, it adds those variables to the subprocess environment.