Skip to content

Commit c478143

Browse files
committed
Merge branch 'mrrobot47-update/volume-creation' into develop
2 parents 9932167 + c10e591 commit c478143

File tree

1 file changed

+7
-2
lines changed

1 file changed

+7
-2
lines changed

php/class-ee-docker.php

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -253,7 +253,10 @@ public static function create_volumes( $prefix, $volumes, $update_to_docker_pref
253253
if ( ! empty( $volume['skip_volume'] ) && true === $volume['skip_volume'] ) {
254254
continue;
255255
}
256-
$fs->mkdir( dirname( $volume['path_to_symlink'] ) );
256+
$path_to_symlink_not_empty = ! empty( dirname( $volume['path_to_symlink'] ) );
257+
if ( $path_to_symlink_not_empty ) {
258+
$fs->mkdir( dirname( $volume['path_to_symlink'] ) );
259+
}
257260
EE::exec(
258261
sprintf(
259262
'docker volume create \
@@ -265,7 +268,9 @@ public static function create_volumes( $prefix, $volumes, $update_to_docker_pref
265268
$volume['name']
266269
)
267270
);
268-
$fs->symlink( sprintf( '%s/volumes/%s_%s/_data', $docker_root_dir, $volume_prefix, $volume['name'] ), $volume['path_to_symlink'] );
271+
if ( $path_to_symlink_not_empty ) {
272+
$fs->symlink( sprintf( '%s/volumes/%s_%s/_data', $docker_root_dir, $volume_prefix, $volume['name'] ), $volume['path_to_symlink'] );
273+
}
269274
}
270275
}
271276

0 commit comments

Comments
 (0)