From fb4f11cc71cd3dbd8d7832ea9445286219fd6425 Mon Sep 17 00:00:00 2001 From: Ivan Shumkov Date: Sat, 8 Apr 2023 03:00:23 +0800 Subject: [PATCH] feat(dashmate): exit status with 2 if it's not running --- packages/dashmate/src/commands/status/index.js | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/packages/dashmate/src/commands/status/index.js b/packages/dashmate/src/commands/status/index.js index 84f831ae76a..b85066c0d11 100644 --- a/packages/dashmate/src/commands/status/index.js +++ b/packages/dashmate/src/commands/status/index.js @@ -24,7 +24,11 @@ class StatusCommand extends ConfigBaseCommand { config, ) { if (!(await dockerCompose.isServiceRunning(config.toEnvs()))) { - throw new Error('Node is not running, start it with `dashmate start`'); + const error = new Error('Node is not running, start it with `dashmate start`'); + + error.exitCode = 2; + + throw error; } const scope = await getOverviewScope(config);