Skip to content

Commit fd2b549

Browse files
committed
Fix launch invocation and obfuscate sensetive info
Signed-off-by: Riddhesh Sanghvi <riddheshsanghvi96@gmail.com>
1 parent f4559a6 commit fd2b549

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

src/WordPress.php

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -374,7 +374,7 @@ private function maybe_verify_remote_db_connection() {
374374
// The since we're inside the container and we want to access host machine,
375375
// we would need to replace localhost with default gateway.
376376
if ( $this->site_data['db_host'] === '127.0.0.1' || $this->site_data['db_host'] === 'localhost' ) {
377-
$launch = \EE::exec( sprintf( "docker network inspect %s --format='{{ (index .IPAM.Config 0).Gateway }}'", $this->site_data['site_url'] ), false, true );
377+
$launch = \EE::launch( sprintf( "docker network inspect %s --format='{{ (index .IPAM.Config 0).Gateway }}'", $this->site_data['site_url'] ) );
378378

379379
if ( ! $launch->return_code ) {
380380
$this->site_data['db_host'] = trim( $launch->stdout, "\n" );
@@ -552,7 +552,11 @@ private function install_wp() {
552552
$install_command .= $this->site_data['app_admin_password'] ? sprintf( ' --admin_password=\'%s\'', $this->site_data['app_admin_password'] ) : '';
553553
$install_command .= sprintf( ' --admin_email=\'%s\' %s', $this->site_data['app_admin_email'], $maybe_multisite_type );
554554

555-
$core_install = \EE::exec( $install_command );
555+
$core_install = \EE::exec( $install_command, false, false, [
556+
$this->site_data['app_admin_username'],
557+
$this->site_data['app_admin_email'],
558+
$this->site_data['app_admin_password'],
559+
] );
556560

557561
if ( ! $core_install ) {
558562
\EE::warning( 'WordPress install failed. Please check logs.' );

0 commit comments

Comments
 (0)