@@ -46,6 +46,9 @@ export class DockerIntegration extends BaseIntegration {
4646 if ( ! ( await this . checkEnv ( ) ) ) {
4747 return ;
4848 }
49+
50+ let didExecuteAHostAction = false ;
51+
4952 const { containersOnHost, runningContainersOnHost } =
5053 await this . containersOnHost ( ) ;
5154
@@ -54,6 +57,8 @@ export class DockerIntegration extends BaseIntegration {
5457 ) ;
5558
5659 if ( containersToStop . length > 0 ) {
60+ didExecuteAHostAction = true ;
61+
5762 this . state . logInformation (
5863 "Stopping containers that are not required for the current project." ,
5964 ) ;
@@ -68,6 +73,8 @@ export class DockerIntegration extends BaseIntegration {
6873 }
6974
7075 if ( imagesToPull . length > 0 ) {
76+ didExecuteAHostAction = true ;
77+
7178 this . state . logInformation (
7279 "Downloading images and creating containers in the background..." ,
7380 ) ;
@@ -76,6 +83,8 @@ export class DockerIntegration extends BaseIntegration {
7683
7784 for ( const key of Object . keys ( containerObject ) ) {
7885 if ( ! containersOnHost . includes ( key ) ) {
86+ didExecuteAHostAction = true ;
87+
7988 const info = containerObject [ key ] ;
8089 await exec (
8190 `docker create ${ info . createArguments ?? "" } --name ${ key } ${
@@ -90,10 +99,14 @@ export class DockerIntegration extends BaseIntegration {
9099 ) ;
91100
92101 if ( containersToStart . length > 0 ) {
102+ didExecuteAHostAction = true ;
103+
93104 await exec ( `docker start ${ Object . keys ( containerObject ) . join ( " " ) } ` ) ;
94105 }
95106
96- this . state . logInformation ( "Required docker containers are running!" ) ;
107+ if ( didExecuteAHostAction ) {
108+ this . state . logInformation ( "Required docker containers are running!" ) ;
109+ }
97110 }
98111
99112 async containersOnHost ( ) {
0 commit comments