Skip to content

Commit

Permalink
Check config argument before using it.
Browse files Browse the repository at this point in the history
  • Loading branch information
DickvdBrink committed Aug 20, 2014
1 parent 00cb772 commit 690a12e
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions src/tslint-cli.ts
Original file line number Diff line number Diff line change
Expand Up @@ -136,6 +136,12 @@ if ("help" in argv) {
process.exit(0);
}

// When provided it should point to an existing location
if (argv.c && !fs.existsSync(argv.c)) {
console.error("Invalid option for configuration: " + argv.c);
process.exit(1);
}

var processFile = (file: string) => {
if (!fs.existsSync(file)) {
console.error("Unable to open file: " + file);
Expand Down

0 comments on commit 690a12e

Please sign in to comment.