fix(bazel): unable to launch protractor test on windows (#27850)

Due to an incorrect environment variable name, it's currently not possible to launch Protractor on Windows using the Bazel protractor rule.

PR Close #27850
This commit is contained in:
Paul Gschwendtner 2018-12-27 23:28:22 +01:00 committed by Ben Lesh
parent a9790018df
commit 1e6c9be86c
1 changed files with 5 additions and 2 deletions

View File

@ -77,7 +77,10 @@ def _protractor_web_test_impl(ctx):
output = ctx.outputs.executable, output = ctx.outputs.executable,
is_executable = True, is_executable = True,
content = """#!/usr/bin/env bash content = """#!/usr/bin/env bash
if [ -e "$RUNFILE_MANIFEST_FILE" ]; then # Immediately exit if any command fails.
set -e
if [ -e "$RUNFILES_MANIFEST_FILE" ]; then
while read line; do while read line; do
declare -a PARTS=($line) declare -a PARTS=($line)
if [ "${{PARTS[0]}}" == "{TMPL_protractor}" ]; then if [ "${{PARTS[0]}}" == "{TMPL_protractor}" ]; then
@ -85,7 +88,7 @@ if [ -e "$RUNFILE_MANIFEST_FILE" ]; then
elif [ "${{PARTS[0]}}" == "{TMPL_conf}" ]; then elif [ "${{PARTS[0]}}" == "{TMPL_conf}" ]; then
readonly CONF=${{PARTS[1]}} readonly CONF=${{PARTS[1]}}
fi fi
done < $RUNFILE_MANIFEST_FILE done < $RUNFILES_MANIFEST_FILE
else else
readonly PROTRACTOR=../{TMPL_protractor} readonly PROTRACTOR=../{TMPL_protractor}
readonly CONF=../{TMPL_conf} readonly CONF=../{TMPL_conf}