Skip to content

Commit 2f8c3f6

Browse files
authored
fix(dashmate): status command fails if drive is not running (#2364)
1 parent 571bafa commit 2f8c3f6

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

packages/dashmate/src/status/scopes/platform.js

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ import { DockerStatusEnum } from '../enums/dockerStatus.js';
66
import { ServiceStatusEnum } from '../enums/serviceStatus.js';
77
import determineStatus from '../determineStatus.js';
88
import ContainerIsNotPresentError from '../../docker/errors/ContainerIsNotPresentError.js';
9+
import ServiceIsNotRunningError from '../../docker/errors/ServiceIsNotRunningError.js';
910

1011
/**
1112
* @returns {getPlatformScopeFactory}
@@ -218,7 +219,8 @@ export default function getPlatformScopeFactory(
218219
// Throw an error if it's not a Drive issue
219220
if (!(e instanceof DockerComposeError
220221
&& e.dockerComposeExecutionResult
221-
&& e.dockerComposeExecutionResult.exitCode !== 0)) {
222+
&& e.dockerComposeExecutionResult.exitCode !== 0)
223+
&& !(e instanceof ServiceIsNotRunningError)) {
222224
throw e;
223225
}
224226
}

0 commit comments

Comments
 (0)