fix(bazel): unknown replay compiler error in windows (#26711)

In Windows the compiler path ends with `.exe` thus it will never match and throw  `Unknown replay compiler`

PR Close #26711
This commit is contained in:
Alan Agius 2018-10-31 14:08:11 +01:00 committed by Kara Erickson
parent aca8ea9c0b
commit aed95fd8c7
1 changed files with 4 additions and 2 deletions

View File

@ -81,9 +81,11 @@ def _esm5_outputs_aspect(target, ctx):
)
replay_compiler = target.typescript.replay_params.compiler.path.split("/")[-1]
if replay_compiler == "tsc_wrapped":
# in windows replay_compiler path end with '.exe'
if replay_compiler.startswith("tsc_wrapped"):
compiler = ctx.executable._tsc_wrapped
elif replay_compiler == "ngc-wrapped":
elif replay_compiler.startswith("ngc-wrapped"):
compiler = ctx.executable._ngc_wrapped
else:
fail("Unknown replay compiler", target.typescript.replay_params.compiler.path)