Better bash-less Windows support in actions.run_shell: add command_bat, command_ps #15194
Labels
good first issue
help wanted
Someone outside the Bazel team could own this
P3
We're not considering working on this, but happy to review a PR. (No assignee)
team-Rules-API
API for writing rules/aspects: providers, runfiles, actions, artifacts
type: feature request
Description of the feature request:
For better bash-less Windows support,
ctx.actions.run_shell
could addcommand_bat
(with the same behavior as genrule'scmd_bat
) andcommand_ps
(with the same behavior as genrule'scmd_ps
).This would, in particular, considerably simplify skylib's Windows support, where currently we are forced to write and execute temporary .bat files on Windows (and attempt to deal with the ancient terror of argument quoting in .bat interpreter context - take a look at https://stackoverflow.com/questions/4094699/how-does-the-windows-command-interpreter-cmd-exe-parse-scripts if you don't mind losing some points of sanity).
Pinging potentially interested parties: @brandjon @meteorcloudy @alexeagle
The text was updated successfully, but these errors were encountered: