Skip to content
This repository has been archived by the owner on Mar 25, 2021. It is now read-only.

Fix --out: Only set exitCode instead of exiting immediately #2867

Merged
merged 1 commit into from
Jun 2, 2017
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@
"lint:global": "tslint --project test/tsconfig.json --format stylish --type-check # test includes 'src' too",
"lint:from-bin": "node bin/tslint --project test/tsconfig.json --format stylish",
"test": "npm-run-all test:pre -p test:mocha test:rules",
"test:pre": "cd ./test/config && npm install",
"test:pre": "cd ./test/config && npm install --no-save",
"test:mocha": "mocha --reporter spec --colors \"build/test/**/*Tests.js\"",
"test:rules": "node ./build/test/ruleTestRunner.js",
"verify": "npm-run-all clean compile lint test docs",
Expand Down
7 changes: 6 additions & 1 deletion src/tslint-cli.ts
Original file line number Diff line number Diff line change
Expand Up @@ -254,7 +254,12 @@ run({
}, {
log,
error: (m) => console.error(m),
}).then(process.exit);
}).then((rc) => {
process.exitCode = rc;
}).catch((e) => {
console.error(e);
process.exitCode = 1;
});

function optionUsageTag({short, name}: Option) {
return short !== undefined ? `-${short}, --${name}` : `--${name}`;
Expand Down