Skip to content

Commit

Permalink
await run results in lit-cli
Browse files Browse the repository at this point in the history
  • Loading branch information
e111077 committed Aug 26, 2022
1 parent 98bfb81 commit 37ae131
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions packages/labs/cli/src/lib/lit-cli.ts
Expand Up @@ -94,7 +94,10 @@ export class LitCli {

const result = await this.getCommand(this.commands, this.args);
if ('invalidCommand' in result) {
return helpCommand.run({command: [result.invalidCommand]}, this.console);
return await helpCommand.run(
{command: [result.invalidCommand]},
this.console
);
} else if ('commandNotInstalled' in result) {
this.console.error(`Command not installed.`);
return {exitCode: 1};
Expand Down Expand Up @@ -125,11 +128,11 @@ export class LitCli {
this.console.debug(
`'--help' option found, running 'help' for given command...`
);
return helpCommand.run({command: commandName}, this.console);
return await helpCommand.run({command: commandName}, this.console);
}

this.console.debug('Running command...');
return command.run(commandOptions, this.console);
return await command.run(commandOptions, this.console);
}
}

Expand Down

0 comments on commit 37ae131

Please sign in to comment.