From 1e6c9be86c42ec9662757f533d16045c1485484a Mon Sep 17 00:00:00 2001 From: Paul Gschwendtner Date: Thu, 27 Dec 2018 23:28:22 +0100 Subject: [PATCH] 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 --- packages/bazel/src/protractor/protractor_web_test.bzl | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/packages/bazel/src/protractor/protractor_web_test.bzl b/packages/bazel/src/protractor/protractor_web_test.bzl index 0dc4784535..815f7351bb 100644 --- a/packages/bazel/src/protractor/protractor_web_test.bzl +++ b/packages/bazel/src/protractor/protractor_web_test.bzl @@ -77,7 +77,10 @@ def _protractor_web_test_impl(ctx): output = ctx.outputs.executable, is_executable = True, 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 declare -a PARTS=($line) if [ "${{PARTS[0]}}" == "{TMPL_protractor}" ]; then @@ -85,7 +88,7 @@ if [ -e "$RUNFILE_MANIFEST_FILE" ]; then elif [ "${{PARTS[0]}}" == "{TMPL_conf}" ]; then readonly CONF=${{PARTS[1]}} fi - done < $RUNFILE_MANIFEST_FILE + done < $RUNFILES_MANIFEST_FILE else readonly PROTRACTOR=../{TMPL_protractor} readonly CONF=../{TMPL_conf}