diff --git a/src/program.js b/src/program.js index dfc6b0d764..2887a7f5ab 100644 --- a/src/program.js +++ b/src/program.js @@ -71,13 +71,11 @@ export class Program { : Object = {}): Promise { this.shouldExitProgram = shouldExitProgram; - let argv; - let cmd; - this.yargs.exitProcess(this.shouldExitProgram); - argv = this.yargs.argv; - cmd = argv._[0]; + const argv = this.yargs.argv; + const cmd = argv._[0]; + if (cmd === undefined) { throw new WebExtError('No sub-command was specified in the args'); }