fail if the commit directory does not exist

because the execSync message is less than helpful
parent 96bf03cb
......@@ -94,6 +94,13 @@ function parseArgs(argv: string[]): any {
}
}
if (options.commit) {
if (!fs.existsSync(options.commit)) {
console.error(`${options.commit} does not exist`)
options.help = true
}
}
if ("help" in options) {
const usage = commandLineUsage(sections)
console.warn(usage)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment