From 2f8c3f63b211308e6ac562325bf91e8811cb217f Mon Sep 17 00:00:00 2001 From: Ivan Shumkov Date: Tue, 3 Dec 2024 13:27:53 +0700 Subject: [PATCH] fix(dashmate): status command fails if drive is not running (#2364) --- packages/dashmate/src/status/scopes/platform.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/packages/dashmate/src/status/scopes/platform.js b/packages/dashmate/src/status/scopes/platform.js index c3fe48d8e8..dca8783e31 100644 --- a/packages/dashmate/src/status/scopes/platform.js +++ b/packages/dashmate/src/status/scopes/platform.js @@ -6,6 +6,7 @@ import { DockerStatusEnum } from '../enums/dockerStatus.js'; import { ServiceStatusEnum } from '../enums/serviceStatus.js'; import determineStatus from '../determineStatus.js'; import ContainerIsNotPresentError from '../../docker/errors/ContainerIsNotPresentError.js'; +import ServiceIsNotRunningError from '../../docker/errors/ServiceIsNotRunningError.js'; /** * @returns {getPlatformScopeFactory} @@ -218,7 +219,8 @@ export default function getPlatformScopeFactory( // Throw an error if it's not a Drive issue if (!(e instanceof DockerComposeError && e.dockerComposeExecutionResult - && e.dockerComposeExecutionResult.exitCode !== 0)) { + && e.dockerComposeExecutionResult.exitCode !== 0) + && !(e instanceof ServiceIsNotRunningError)) { throw e; } }