Azure / InnovationEngine

An experiment in simplicity for complex environments
MIT License
35 stars 18 forks source link

Nested runs of `ie` utilize the same environment state file #214

Open vmarcella opened 3 months ago

vmarcella commented 3 months ago

To keep track of environment variables created by executing commands, we save them into a temporary file named /tmp/env-var after the execution of each command so that we can restore the environment variables during the execution of the next command. This means that if ie were to execute a doc that has a codeblock which calls ie, the state file will be overwritten from the nested invocation of ie which can break steps that come after invoking ie in a scenario.

This can be replicated with a markdown file scenario that has these 3 steps:

export VAR=foo
ie <any-execution-command> <scenario>
echo $VAR # Should break because the previous command deletes the environment state.

This isn't a critical issue for most scenarios, but it will prevent us from having our specs execute correctly because they rely on invoking ie to showcase new features.