diff --git a/src/commands/phpmyadmin.ts b/src/commands/phpmyadmin.ts index 9579846f21..82b6bb63d1 100644 --- a/src/commands/phpmyadmin.ts +++ b/src/commands/phpmyadmin.ts @@ -126,7 +126,6 @@ export class PhpMyAdminCommand { track: CommandTracker; steps = { ENABLE: 'enable', - PREPARING: 'preparing', GENERATE: 'generate', }; private progressTracker: ProgressTracker; @@ -137,7 +136,6 @@ export class PhpMyAdminCommand { this.track = trackerFn; this.progressTracker = new ProgressTracker( [ { id: this.steps.ENABLE, name: 'Enabling PHPMyAdmin for this environment' }, - { id: this.steps.PREPARING, name: 'Preparing' }, { id: this.steps.GENERATE, name: 'Generating access link' }, ] ); } @@ -190,6 +188,7 @@ export class PhpMyAdminCommand { if ( ! [ 'running', 'enabled' ].includes( status ) ) { await enablePhpMyAdmin( this.env.id as number ); await pollUntil( this.getStatus.bind( this ), 1000, ( sts: string ) => sts === 'running' ); + await pollUntil( this.readyToServe.bind( this ), 5000 ); } } @@ -236,16 +235,6 @@ export class PhpMyAdminCommand { ); } - this.progressTracker.stepRunning( this.steps.PREPARING ); - try { - await pollUntil( this.readyToServe.bind( this ), 5000 ); - this.progressTracker.stepSuccess( this.steps.PREPARING ); - } catch ( err ) { - const error = err as Error; - this.progressTracker.updateMessage( `Skipped: ${ error.message }` ); - this.progressTracker.stepSkipped( this.steps.PREPARING ); - } - let url; try { this.progressTracker.stepRunning( this.steps.GENERATE );