From da07e0f642de0116f013d455de394dcdb8704566 Mon Sep 17 00:00:00 2001 From: Rajeshreeputra Date: Mon, 24 Jul 2023 18:33:12 +0530 Subject: [PATCH] ACMS-1885: Fix site install regression issue introduced in 1.1.4 version. --- src/Helpers/Task/Steps/SiteInstall.php | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/src/Helpers/Task/Steps/SiteInstall.php b/src/Helpers/Task/Steps/SiteInstall.php index 339b0c30..8b7068a2 100644 --- a/src/Helpers/Task/Steps/SiteInstall.php +++ b/src/Helpers/Task/Steps/SiteInstall.php @@ -68,18 +68,18 @@ public function execute(array $args = []): int { "--site-name=$this->siteName", "--account-pass=$this->password", ]; + + // Remove without-product-info from argument as it is only used internally. + unset($args['without-product-info']); + // Iterate arguments i.e options to prepare for site install. foreach ($args as $key => $value) { - if (!in_array($key, [ - 'without-product-info', - 'no-interaction', - ])) { + if ($value != "true") { $siteInstallCommand[] = "--" . $key . "=" . $value; } - } - // Option no-interation then add suffix --yes to the command. - if (isset($args['no-interaction']) && $args['no-interaction']) { - $siteInstallCommand = array_merge($siteInstallCommand, ["--yes"]); + else { + $siteInstallCommand[] = "--" . $key; + } } return $this->drushCommand->prepare($siteInstallCommand)->run();