fix: guard daemon install command env

This commit is contained in:
Josh Lehman
2026-03-21 11:22:27 -07:00
parent 4fd94f3359
commit bce6f0bda0

View File

@@ -137,11 +137,14 @@ async function gatewayServiceNeedsAutoNodeExtraCaCertsRefresh(params: {
}): Promise<boolean> {
try {
const currentCommand = await params.service.readCommand(params.env);
const currentExecPath = currentCommand?.programArguments[0]?.trim();
if (!currentCommand) {
return false;
}
const currentExecPath = currentCommand.programArguments[0]?.trim();
if (!currentExecPath) {
return false;
}
const currentEnvironment = currentCommand?.environment ?? {};
const currentEnvironment = currentCommand.environment ?? {};
const currentNodeExtraCaCerts = currentEnvironment.NODE_EXTRA_CA_CERTS?.trim();
const expectedNodeExtraCaCerts = resolveAutoNodeExtraCaCerts({
env: {