Closed ashlineldridge closed 1 year ago
Thanks for the issue. I agree we should figure out what provider has the env and fix this. But also the intent is that every entry in the commands
list is actually a command
target, which has an environment
attribute that is respected. It's a bug that that isn't currently enforced.
Ah, OK. I noticed that the environment variables are passed through as expected when I wrap the target in a command
but didn't realise that this should always be the case. Do you see any problem with a multirun
target including another multirun
target in its list of commands? Or should that also be wrapped in a command
?
The intent was for multiuns to only be able to depend on commands. But I'm not opposed to opening it up more for these use cases either
Hi Keith, thanks for the project.
I believe I've come across a bug where hardcoded environment variables aren't passed through to the target when it is invoked by multirun.
E.g., given the following
BUILD.bazel
:And
lint.sh
:I would have expected that
bazel run //:lint
would output theMULTIRUN_*
variables passed through by thelint_script
target, however it doesn't. But if I run thesh_binary
target directly viabazel run //:lint_script
then the variables are output as expected.