cli: properly forward status code in plugin commands

This commit is contained in:
Patrik Oldsberg
2020-03-06 16:30:37 +01:00
parent 1b7d0a4e4b
commit c3febb492f
3 changed files with 3 additions and 0 deletions
@@ -21,6 +21,7 @@ export default async (cmd: Command) => {
if (result.error) {
throw result.error;
}
process.exit(result.status ?? 0);
} catch (error) {
process.stderr.write(`${chalk.red(error.message)}\n`);
process.exit(1);
+1
View File
@@ -9,6 +9,7 @@ export default async () => {
if (result.error) {
throw result.error;
}
process.exit(result.status ?? 0);
} catch (error) {
process.stderr.write(`${chalk.red(error.message)}\n`);
process.exit(1);
+1
View File
@@ -14,6 +14,7 @@ export default async (cmd: Command) => {
if (result.error) {
throw result.error;
}
process.exit(result.status ?? 0);
} catch (error) {
process.stderr.write(`${chalk.red(error.message)}\n`);
process.exit(1);