The Command substitution was not using the context's environment to launch itself, and defaults to the parent process environment. This caused bugs, as described in #715, which I re-state below.
Fixing this is very simple, just pass the environment of the context to the subprocess spawned in Command.
How to reproduce? I couldn't quite come up with a very simple unit test yet, but the below procedure should work.
First a simple executable:
import os
print(os.environ.get("FOO", "There is no foo"))
Place it somewhere on your path, I named it print_env.py.
The
Command
substitution was not using the context's environment to launch itself, and defaults to the parent process environment. This caused bugs, as described in #715, which I re-state below.Fixing this is very simple, just pass the environment of the context to the subprocess spawned in Command.
How to reproduce? I couldn't quite come up with a very simple unit test yet, but the below procedure should work.
First a simple executable:
Place it somewhere on your path, I named it print_env.py.
Then the following launch file:
This launches three "printenv" processes:
So I expect:
What I get: