File tree Expand file tree Collapse file tree 1 file changed +7
-5
lines changed Expand file tree Collapse file tree 1 file changed +7
-5
lines changed Original file line number Diff line number Diff line change @@ -132,13 +132,15 @@ public static function update_docker_compose() {
132132 $ docker_compose_path = EE ::launch ( 'command -v docker-compose ' )->stdout ;
133133 $ docker_compose_path = trim ( $ docker_compose_path );
134134 $ docker_compose_backup_path = EE_BACKUP_DIR . '/docker-compose.backup ' ;
135- $ fs = new Filesystem ();
136- if ( ! $ fs ->exists ( EE_BACKUP_DIR ) ) {
137- $ fs ->mkdir ( EE_BACKUP_DIR );
138- }
139- $ fs ->copy ( $ docker_compose_path , $ docker_compose_backup_path );
140135
141136 if ( version_compare ( '2.27.0 ' , $ docker_compose_version , '> ' ) ) {
137+
138+ $ fs = new Filesystem ();
139+ if ( ! $ fs ->exists ( EE_BACKUP_DIR ) ) {
140+ $ fs ->mkdir ( EE_BACKUP_DIR );
141+ }
142+ $ fs ->copy ( $ docker_compose_path , $ docker_compose_backup_path );
143+
142144 EE ::exec ( "curl -L https://github.com/docker/compose/releases/download/v2.27.0/docker-compose-$(uname -s)-$(uname -m) -o $ docker_compose_path && chmod +x $ docker_compose_path " );
143145 }
144146 }
You can’t perform that action at this time.
0 commit comments