bazelbuild/bazel

Better bash-less Windows support in actions.run_shell: add command_bat, command_ps

Open

#15,194 创建于 2022年4月7日

在 GitHub 查看
 (4 评论) (0 反应) (0 负责人)Java (4,465 fork)batch import
P3good first issuehelp wantedteam-Rules-APItype: feature request

仓库指标

Star
 (25,384 star)
PR 合并指标
 (平均合并 22天 20小时) (30 天内合并 77 个 PR)

描述

Description of the feature request:

For better bash-less Windows support,ctx.actions.run_shell could add command_bat (with the same behavior as genrule's cmd_bat) and command_ps (with the same behavior as genrule's cmd_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

贡献者指南