fix: preserve safe gateway env vars on reinstall (#63136) (thanks @WarrenJones)

* fix(daemon): preserve safe env vars on gateway reinstall

Pass the existing service environment into gateway reinstall planning so safe custom variables survive LaunchAgent rewrites and existing PATH entries are merged instead of being silently dropped.

Made-with: Cursor

* fix(daemon): track managed env keys on reinstall

* fix: preserve safe gateway env vars on reinstall (#63136) (thanks @WarrenJones)

* fix: validate preserved PATH entries on reinstall (#63136) (thanks @WarrenJones)

---------

Co-authored-by: WarrenJones <8704779+WarrenJones@users.noreply.github.com>
Co-authored-by: Ayaan Zaidi <hi@obviy.us>
This commit is contained in:
WarrenJones
2026-04-09 16:59:54 +08:00
committed by GitHub
parent 08ae021d1f
commit 40c5edb5b1
5 changed files with 262 additions and 11 deletions

View File

@@ -124,6 +124,7 @@ export async function runDaemonInstall(opts: DaemonInstallOptions) {
env: installEnv,
port,
runtime: runtimeRaw,
existingEnvironment: existingServiceEnv,
warn: (message) => {
if (json) {
warnings.push(message);