diff options
author | Rich Trott <rtrott@gmail.com> | 2018-10-17 19:17:06 -0700 |
---|---|---|
committer | Refael Ackermann <refack@gmail.com> | 2018-10-18 19:32:54 -0400 |
commit | 6afaebc4a0458e433d410d70d419fbc72b9b7c4a (patch) | |
tree | 354d4cedcc8da4ca1409154b9ce699bb203c6375 /.travis.yml | |
parent | 1d152b6e51c97f8527d1a675084f8bc15444d7f4 (diff) | |
download | node-new-6afaebc4a0458e433d410d70d419fbc72b9b7c4a.tar.gz |
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.yml | 2 |
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 |