Skip to content

Commit

Permalink
Merge branch 'sagarnasit-fix-migration-reverse-step' into develop
Browse files Browse the repository at this point in the history
  • Loading branch information
mrrobot47 committed Dec 27, 2018
2 parents ddfefbc + a67332c commit 179feae
Showing 1 changed file with 10 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -216,8 +216,16 @@ public static function restore_yml_file( $source, $destination, $containers ) {
EE\Migration\SiteContainers::backup_restore( $source, $destination );
chdir( EE_SERVICE_DIR );

$running_containers = implode( ' ', $containers );
if ( ! EE::exec( sprintf( 'docker-compose up -d %s', $running_containers ) ) ) {
if ( empty( $containers ) ) {
return;
}

$services = '';
foreach ( $containers as $container ) {
$services .= ltrim( $container, 'ee-' ) . ' ';
}

if ( ! EE::exec( sprintf( 'docker-compose up -d %s', $services ) ) ) {
throw new \Exception( 'Unable to start ee-containers' );
}
}
Expand Down

0 comments on commit 179feae

Please # to comment.