Skip to content

Commit

Permalink
wp-env start: Report listening port for phpMyAdmin
Browse files Browse the repository at this point in the history
  • Loading branch information
mcsf committed Dec 4, 2024
1 parent 949c4f5 commit 720fdfe
Showing 1 changed file with 15 additions and 0 deletions.
15 changes: 15 additions & 0 deletions packages/env/lib/commands/start.js
Original file line number Diff line number Diff line change
Expand Up @@ -250,6 +250,16 @@ module.exports = async function start( {
);
const testsMySQLPort = testsMySQLAddress.split( ':' ).pop();

let phpmyadminPort;
if ( phpmyadmin ) {
const { out: phpmyadminAddress } = await dockerCompose.port(
'phpmyadmin',
80,
dockerComposeConfig
);
phpmyadminPort = phpmyadminAddress.split( ':' ).pop();
}

spinner.prefixText = 'WordPress development site started'
.concat( siteUrl ? ` at ${ siteUrl }` : '.' )
.concat( '\n' )
Expand All @@ -260,6 +270,11 @@ module.exports = async function start( {
.concat(
`MySQL for automated testing is listening on port ${ testsMySQLPort }`
)
.concat(
phpmyadminPort
? `phpMyAdmin is listening on port ${ phpmyadminPort }`
: ''
)
.concat( '\n' );

spinner.text = 'Done!';
Expand Down

0 comments on commit 720fdfe

Please sign in to comment.