Fix polygerrit lint
Was failing with /home/jenkins/.cache/bazel/_bazel_jenkins/3239551e333dc09ba2b5ef07ff4549b6/execroot/gerrit/bazel-out/local-fastbuild/bin/polygerrit-ui/app/lint_test.runfiles/gerrit/polygerrit-ui/app/lint_test: 14: /home/jenkins/.cache/bazel/_bazel_jenkins/3239551e333dc09ba2b5ef07ff4549b6/execroot/gerrit/bazel-out/local-fastbuild/bin/polygerrit-ui/app/lint_test.runfiles/gerrit/polygerrit-ui/app/lint_test: [[: not found + /usr/bin/eslint --ignore-pattern bower_components/ --ignore-pattern gr-linked-text --ignore-pattern scripts/vendor --ext .html,.js . Change-Id: Ib4650dbacd4d29123f5f1d1021592a5a02377182
This commit is contained in:
parent
86563dfff6
commit
da64859ddd
|
@ -3,7 +3,7 @@
|
|||
set -ex
|
||||
|
||||
eslint_bin=$(which npm)
|
||||
if [[ -z "$eslint_bin" ]]; then
|
||||
if [ -z "$eslint_bin" ]; then
|
||||
echo "NPM must be on the path."
|
||||
exit 1
|
||||
fi
|
||||
|
@ -11,7 +11,7 @@ fi
|
|||
eslint_bin=$(which eslint)
|
||||
eslint_config=$(npm list -g | grep -c eslint-config-google)
|
||||
eslint_plugin=$(npm list -g | grep -c eslint-plugin-html)
|
||||
if [[ -z "$eslint_bin" ]] || [[ eslint_config -eq "0" ]] || [[ eslint_plugin -eq "0" ]]; then
|
||||
if [ -z "$eslint_bin" ] || [ "$eslint_config" -eq "0" ] || [ "$eslint_plugin" -eq "0" ]; then
|
||||
echo "You must install ESLint and its dependencies from NPM."
|
||||
echo "> npm install -g eslint eslint-config-google eslint-plugin-html"
|
||||
echo "For more information, view the README:"
|
||||
|
|
Loading…
Reference in New Issue