@@ -926,7 +926,8 @@ async function maybeStopManagedServiceBeforeMutableUpdate(params: {
|
926 | 926 | |
927 | 927 | if ( |
928 | 928 | params.updateInstallKind === "git" && |
929 | | -!(await gatewayServiceCommandUsesRoot({ root: params.root, command: serviceState.command })) |
| 929 | +(await gatewayServiceCommandUsesRoot({ root: params.root, command: serviceState.command })) === |
| 930 | +false |
930 | 931 | ) { |
931 | 932 | if (!params.jsonMode) { |
932 | 933 | defaultRuntime.log( |
@@ -1459,10 +1460,10 @@ async function gatewayServiceCommandUsesRoot(params: {
|
1459 | 1460 | root: string | undefined; |
1460 | 1461 | env?: NodeJS.ProcessEnv; |
1461 | 1462 | command?: GatewayServiceCommandConfig | null; |
1462 | | -}): Promise<boolean> { |
| 1463 | +}): Promise<boolean | null> { |
1463 | 1464 | const expectedRoot = normalizeOptionalString(params.root); |
1464 | 1465 | if (!expectedRoot) { |
1465 | | -return false; |
| 1466 | +return null; |
1466 | 1467 | } |
1467 | 1468 | const command = |
1468 | 1469 | params.command === undefined |
@@ -1473,7 +1474,7 @@ async function gatewayServiceCommandUsesRoot(params: {
|
1473 | 1474 | const layout = await summarizeGatewayServiceLayout(command); |
1474 | 1475 | const serviceRoot = layout?.packageRoot; |
1475 | 1476 | if (!serviceRoot) { |
1476 | | -return false; |
| 1477 | +return null; |
1477 | 1478 | } |
1478 | 1479 | const [expectedRootReal, serviceRootReal] = await Promise.all([ |
1479 | 1480 | tryRealpathOrResolve(expectedRoot), |
@@ -2242,10 +2243,10 @@ async function maybeRestartService(params: {
|
2242 | 2243 | }); |
2243 | 2244 | if ( |
2244 | 2245 | updatedInstallRestartNeedsServiceRootProof && |
2245 | | -!(await gatewayServiceCommandUsesRoot({ |
| 2246 | +(await gatewayServiceCommandUsesRoot({ |
2246 | 2247 | root: params.result.root, |
2247 | 2248 | env: params.serviceEnv, |
2248 | | -})) |
| 2249 | +})) !== true |
2249 | 2250 | ) { |
2250 | 2251 | if (!params.opts.json) { |
2251 | 2252 | defaultRuntime.log( |
@@ -3820,7 +3821,7 @@ async function updateCommandInternal(opts: UpdateCommandOptions): Promise<void>
|
3820 | 3821 | serviceState.installed && |
3821 | 3822 | serviceState.loaded && |
3822 | 3823 | preManagedServiceStop?.stopped !== true && |
3823 | | -serviceMatchesUpdateRoot !== true; |
| 3824 | +serviceMatchesUpdateRoot === false; |
3824 | 3825 | if ( |
3825 | 3826 | shouldPrepareUpdatedInstallRestart({ |
3826 | 3827 | updateMode: resultWithPostUpdate.mode, |
|