-
Notifications
You must be signed in to change notification settings - Fork 63
Open
Description
There was a fix for this in 7566cb9, but it was removed by copybara 3eea687 either accidentally intentionally. Of course, I'm happy to see this fixed in any way, not just my own, but I can confirm that this revert breaks antlr4 parser generation due to antlr/antlr4#3138, so it seems like it is still needed.
cc @TristonianJones since you merged the first fix
This is related to #768.
Sort of related, it would be relatively easy to net another win by avoiding a dependency on bash on Windows here. Should be relatively easy to accomplish. Not fully tested, but should work (PowerShell supports -c the same way UNIX shells tend to):
- ctx.actions.run_shell(
+ ctx.actions.run(
mnemonic = "CopyHeader" + suffix,
+ executable = "PowerShell.exe" if is_windows else "bash",
inputs = [output],
outputs = [header],
- command = 'cp "{generated}" "{out}"'.format(generated = generated + ".h", out = header.path),
+ arguments = [
+ "-c",
+ 'cp "{generated}" "{out}"'.format(generated = generated + ".h", out = header.path),
+ ],
)
- ctx.actions.run_shell(
+ ctx.actions.run(
mnemonic = "CopySource" + suffix,
+ executable = "PowerShell.exe" if is_windows else "bash",
inputs = [output],
outputs = [source],
- command = 'cp "{generated}" "{out}"'.format(generated = generated + ".cpp", out = source.path),
+ arguments = [
+ "-c",
+ 'cp "{generated}" "{out}"'.format(generated = generated + ".cpp", out = source.path),
+ ],
)Metadata
Metadata
Assignees
Labels
No labels