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

Commit

Permalink
Throw a string instead of an Error object since Optimist expects a st…
Browse files Browse the repository at this point in the history
…ring (#1991)
  • Loading branch information
nchen63 authored and adidahiya committed Jan 5, 2017
1 parent 23552e0 commit e1a0188
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions src/tslint-cli.ts
Original file line number Diff line number Diff line change
Expand Up @@ -25,11 +25,15 @@ const processed = optimist
.check((argv: any) => {
// at least one of file, help, version, project or unqualified argument must be present
if (!(argv.h || argv.i || argv.test || argv.v || argv.project || argv._.length > 0)) {
throw new Error("Missing files");
// throw a string, otherwise a call stack is printed for this message
// tslint:disable-next-line:no-string-throw
throw "Missing files";
}

if (argv.f) {
throw new Error("-f option is no longer available. Supply files directly to the tslint command instead.");
// throw a string, otherwise a call stack is printed for this message
// tslint:disable-next-line:no-string-throw
throw "-f option is no longer available. Supply files directly to the tslint command instead.";
}
})
.options({
Expand Down

0 comments on commit e1a0188

Please sign in to comment.