File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -9,6 +9,9 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
99
1010* [ PR-12] ( https://github.com/itk-devops/devops_itkdev-docker-server/pull/12 )
1111 Clean up Taskfile and dev tooling for ` docker compose ` .
12+ * [ PR-11] ( https://github.com/itk-devops/devops_itkdev-docker-server/pull/11 )
13+ Propagate command exit code instead of swallowing failed docker compose
14+ commands.
1215
1316## [ 0.0.14] - 2025-03-26
1417
Original file line number Diff line number Diff line change @@ -13,8 +13,8 @@ exports.handler = function (argv: { [x: string]: any; base: string; debug: any;
1313
1414 // Test env file exists.
1515 if ( ! utils . isFile ( argv . base + '/' + env ) ) {
16- console . error ( ' The env file not found!' ) ;
17- return ;
16+ console . error ( ` The env ( ${ env } ) file not found!` ) ;
17+ process . exit ( 1 ) ;
1818 }
1919
2020 // Hack to parse the commands that should be sendt to docker.
Original file line number Diff line number Diff line change @@ -83,7 +83,11 @@ export default class Docker {
8383 if ( err instanceof Error ) {
8484 console . error ( err . message ) ;
8585 }
86- return null ;
86+
87+ // Propagate the failed command's exit code so callers (CI, Ansible)
88+ // detect the failure instead of seeing a false success.
89+ const status = ( err as { status ?: number | null } ) . status ;
90+ process . exit ( typeof status === 'number' ? status : 1 ) ;
8791 }
8892 }
8993 }
You can’t perform that action at this time.
0 commit comments