It's confusing since code in probes exec.command behaves differently than in process command, since $variable needs to be escaped ($$) in order to be resolved at runtime, instead of at config parsing time
for example, the following in probe's exec.command
would print a: unless env var a was set when PC was started
in order for it to behave like in process command, it would need to be:
a=something
echo "a: $$a"
see:
F1bonacc1/process-compose#63
F1bonacc1/process-compose#63 (comment)