Skip to content

Commit

Permalink
chore: Log reminder about tsc if DocLint fails locally (#5652)
Browse files Browse the repository at this point in the history
I lost some time debugging before realising that I needed to run tsc. I
don't really want to put `npm run tsc` before this command else we'll
run tsc multiple times on each CI build, so I think this message is
suitable.

Travis defines `process.env.TRAVIS` and if that exists we don't want to
log this as on CI we're guaranteed to have an up to date `lib/`
directory.
  • Loading branch information
jackfranklin committed Apr 16, 2020
1 parent 37bae17 commit a9f6a26
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions utils/doclint/cli.js
Expand Up @@ -87,6 +87,10 @@ async function run() {
clearExit = false;
}
console.log(`${errors.length} failures, ${warnings.length} warnings.`);

if (!clearExit && !process.env.TRAVIS)
console.log('\nIs your lib/ directory up to date? You might need to `npm run tsc`.\n');

const runningTime = Date.now() - startTime;
console.log(`DocLint Finished in ${runningTime / 1000} seconds`);
process.exit(clearExit ? 0 : 1);
Expand Down

0 comments on commit a9f6a26

Please sign in to comment.