From 801c1cfc0e37486d15de31ca50712cae5f7f5145 Mon Sep 17 00:00:00 2001 From: Owen Voke Date: Tue, 24 Feb 2026 16:43:03 +0000 Subject: [PATCH 1/3] feat: add support for custom config path --- app/Services/CredentialStore.php | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/app/Services/CredentialStore.php b/app/Services/CredentialStore.php index 5e8b040..fb7fa4e 100644 --- a/app/Services/CredentialStore.php +++ b/app/Services/CredentialStore.php @@ -8,9 +8,13 @@ class CredentialStore public function __construct() { - $home = $_SERVER['HOME'] ?? $_SERVER['USERPROFILE'] ?? ''; + if ($_SERVER['OHDEAR_CONFIG_PATH']) { + $this->configPath = $_SERVER['OHDEAR_CONFIG_PATH']; + } else { + $home = $_SERVER['HOME'] ?? $_SERVER['USERPROFILE'] ?? ''; - $this->configPath = "{$home}/.ohdear/config.json"; + $this->configPath = "{$home}/.ohdear/config.json"; + } } public function getToken(): ?string From eb108ed1b5950d26ef066522e9eff2f7ac5db66e Mon Sep 17 00:00:00 2001 From: Owen Voke Date: Tue, 24 Feb 2026 16:45:39 +0000 Subject: [PATCH 2/3] fix: resolve missing array key --- app/Services/CredentialStore.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/Services/CredentialStore.php b/app/Services/CredentialStore.php index fb7fa4e..6f6bd2e 100644 --- a/app/Services/CredentialStore.php +++ b/app/Services/CredentialStore.php @@ -8,7 +8,7 @@ class CredentialStore public function __construct() { - if ($_SERVER['OHDEAR_CONFIG_PATH']) { + if (isset($_SERVER['OHDEAR_CONFIG_PATH'])) { $this->configPath = $_SERVER['OHDEAR_CONFIG_PATH']; } else { $home = $_SERVER['HOME'] ?? $_SERVER['USERPROFILE'] ?? ''; From 4f7d2028ca7d86bd3ae753df50643309a9863c67 Mon Sep 17 00:00:00 2001 From: Owen Voke Date: Tue, 24 Feb 2026 16:48:58 +0000 Subject: [PATCH 3/3] chore: change env variable name --- app/Services/CredentialStore.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/app/Services/CredentialStore.php b/app/Services/CredentialStore.php index 6f6bd2e..016e0b4 100644 --- a/app/Services/CredentialStore.php +++ b/app/Services/CredentialStore.php @@ -8,8 +8,8 @@ class CredentialStore public function __construct() { - if (isset($_SERVER['OHDEAR_CONFIG_PATH'])) { - $this->configPath = $_SERVER['OHDEAR_CONFIG_PATH']; + if (isset($_SERVER['OHDEAR_CONFIG_FILE_PATH'])) { + $this->configPath = $_SERVER['OHDEAR_CONFIG_FILE_PATH']; } else { $home = $_SERVER['HOME'] ?? $_SERVER['USERPROFILE'] ?? '';