summaryrefslogtreecommitdiff
path: root/.travis.yml
diff options
context:
space:
mode:
authorRich Trott <rtrott@gmail.com>2018-10-17 19:17:06 -0700
committerRefael Ackermann <refack@gmail.com>2018-10-18 19:32:54 -0400
commit6afaebc4a0458e433d410d70d419fbc72b9b7c4a (patch)
tree354d4cedcc8da4ca1409154b9ce699bb203c6375 /.travis.yml
parent1d152b6e51c97f8527d1a675084f8bc15444d7f4 (diff)
downloadandroid-node-v8-6afaebc4a0458e433d410d70d419fbc72b9b7c4a.tar.gz
android-node-v8-6afaebc4a0458e433d410d70d419fbc72b9b7c4a.tar.bz2
android-node-v8-6afaebc4a0458e433d410d70d419fbc72b9b7c4a.zip
tools: do not lint commit message if var undefined
Check that $TRAVIS_COMMIT_RANGE is set before trying to lint commit messages in Travis CI. Refs: https://github.com/nodejs/node/pull/23572#issuecomment-430850382 Refs: https://github.com/nodejs/node/pull/22842#issuecomment-430850049 PR-URL: https://github.com/nodejs/node/pull/23725 Reviewed-By: Anatoli Papirovski <apapirovski@mac.com> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Luigi Pinca <luigipinca@gmail.com> Reviewed-By: Matheus Marchini <mat@mmarchini.me>
Diffstat (limited to '.travis.yml')
-rw-r--r--.travis.yml2
1 files changed, 1 insertions, 1 deletions
diff --git a/.travis.yml b/.travis.yml
index fad2e7f0c7..156d28298b 100644
--- a/.travis.yml
+++ b/.travis.yml
@@ -13,7 +13,7 @@ matrix:
script:
- make lint
# Lint the first commit in the PR.
- - git log $TRAVIS_COMMIT_RANGE --pretty=format:'%h' --no-merges | tail -1 | xargs npx core-validate-commit --no-validate-metadata
+ - \[ -z "$TRAVIS_COMMIT_RANGE" \] || git log $TRAVIS_COMMIT_RANGE --pretty=format:'%h' --no-merges | tail -1 | xargs npx core-validate-commit --no-validate-metadata
- name: "Test Suite"
install:
- ./configure