Skip to content

Commit

Permalink
fix(travis-cli): passdown argv to lint command
Browse files Browse the repository at this point in the history
passdown travis-cli argument to @commitlint/cli
  • Loading branch information
sharvit committed Jan 4, 2020
1 parent 3fce339 commit 4170721
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions @commitlint/travis-cli/src/cli.js
Expand Up @@ -42,13 +42,15 @@ async function main() {
// Restore stashed changes if any
await pop();

const args = process.argv.slice(2);

// Lint all commits in TRAVIS_COMMIT_RANGE if available
if (IS_PR && RANGE) {
const [start, end] = RANGE.split('.').filter(Boolean);
await lint(['--from', start, '--to', end]);
await lint(['--from', start, '--to', end, ...args]);
} else {
const input = await log(COMMIT);
await lint([], {input});
await lint(args, {input});
}
}

Expand Down

0 comments on commit 4170721

Please sign in to comment.