Closed alexeagle closed 8 months ago
hrm I actually removed that "$@"
in https://github.com/keith/rules_multirun/commit/e7d1d13e52c086586d593d215518509bfb613dfa#diff-50b072d077ec6196a13e98aec4bd258a68b30d4128ee3b6e79aa51e196e1c3b3L116, I think because I thought it wasn't doing anything, so I can add it back and fix this with this I think, can you test it?
Thanks - in my case that's not enough, because I want to pass the args to the underlying binary that gets spawned. I think in that commit they still get dropped on the floor.
+1, in atlassian/bazel-tools
implementation of multirun arguments of bazel run
are passed to every command.
ah ok, def happy to take a PR to fix
https://github.com/keith/rules_multirun/pull/48 it works
cc @keith @alexeagle
Nice! Thank you!
thanks!
Multirun gets spawned by a generated bash wrapper like this:
exec ./'../rules_multirun~0.7.0/internal/multirun' -f 'tools/format/format.json' "$@"
Currently the multirun executable assumes the last argv is the instructions:
https://github.com/keith/rules_multirun/blob/main/internal/multirun.py#L112
This means if the user passes an argument, say from rules_lint they want to format only one file:
it fails:
In my case, the behavior I had prior to adopting rules_multirun was that the aggregator binary passed the argv to each of the binaries it wraps, so that's what I would want to do here.