Skip to content

Commit 179feae

Browse files
committed
Merge branch 'sagarnasit-fix-migration-reverse-step' into develop
2 parents ddfefbc + a67332c commit 179feae

File tree

1 file changed

+10
-2
lines changed

1 file changed

+10
-2
lines changed

migrations/container/20181225063950_service-command_change_global_service_container_names.php

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -216,8 +216,16 @@ public static function restore_yml_file( $source, $destination, $containers ) {
216216
EE\Migration\SiteContainers::backup_restore( $source, $destination );
217217
chdir( EE_SERVICE_DIR );
218218

219-
$running_containers = implode( ' ', $containers );
220-
if ( ! EE::exec( sprintf( 'docker-compose up -d %s', $running_containers ) ) ) {
219+
if ( empty( $containers ) ) {
220+
return;
221+
}
222+
223+
$services = '';
224+
foreach ( $containers as $container ) {
225+
$services .= ltrim( $container, 'ee-' ) . ' ';
226+
}
227+
228+
if ( ! EE::exec( sprintf( 'docker-compose up -d %s', $services ) ) ) {
221229
throw new \Exception( 'Unable to start ee-containers' );
222230
}
223231
}

0 commit comments

Comments
 (0)