fix: propagate isUpgrade flag from Upgrade to Install for CLI path

Install::action() hardcoded isUpgrade=false, so the CLI upgrade path
never rewrote compose/env files. Added a protected property that
Upgrade sets before calling parent::action().

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
Jake Barnby
2026-03-20 21:56:06 +13:00
co-authored by Claude Opus 4.6
parent d4c9af2eb2
commit ef0954cdda
2 changed files with 3 additions and 1 deletions
+2 -1
View File
@@ -33,6 +33,7 @@ class Install extends Action
private const string APPWRITE_API_URL = 'http://appwrite';
private const string GROWTH_API_URL = 'https://growth.appwrite.io/v1';
protected bool $isUpgrade = false;
protected string $hostPath = '';
protected ?bool $isLocalInstall = null;
protected ?array $installerConfig = null;
@@ -66,7 +67,7 @@ class Install extends Action
bool $noStart,
string $database
): void {
$isUpgrade = false;
$isUpgrade = $this->isUpgrade;
$defaultHttpPort = '80';
$defaultHttpsPort = '443';
$config = Config::getParam('variables');
+1
View File
@@ -42,6 +42,7 @@ class Upgrade extends Install
bool $noStart,
string $database
): void {
$this->isUpgrade = true;
$isLocalInstall = $this->isLocalInstall();
$this->applyLocalPaths($isLocalInstall, true);