@@ -926,7 +926,8 @@ async function maybeStopManagedServiceBeforeMutableUpdate(params: {
926926
927927 if (
928928 params . updateInstallKind === "git" &&
929- ! ( await gatewayServiceCommandUsesRoot ( { root : params . root , command : serviceState . command } ) )
929+ ( await gatewayServiceCommandUsesRoot ( { root : params . root , command : serviceState . command } ) ) ===
930+ false
930931 ) {
931932 if ( ! params . jsonMode ) {
932933 defaultRuntime . log (
@@ -1459,10 +1460,10 @@ async function gatewayServiceCommandUsesRoot(params: {
14591460 root : string | undefined ;
14601461 env ?: NodeJS . ProcessEnv ;
14611462 command ?: GatewayServiceCommandConfig | null ;
1462- } ) : Promise < boolean > {
1463+ } ) : Promise < boolean | null > {
14631464 const expectedRoot = normalizeOptionalString ( params . root ) ;
14641465 if ( ! expectedRoot ) {
1465- return false ;
1466+ return null ;
14661467 }
14671468 const command =
14681469 params . command === undefined
@@ -1473,7 +1474,7 @@ async function gatewayServiceCommandUsesRoot(params: {
14731474 const layout = await summarizeGatewayServiceLayout ( command ) ;
14741475 const serviceRoot = layout ?. packageRoot ;
14751476 if ( ! serviceRoot ) {
1476- return false ;
1477+ return null ;
14771478 }
14781479 const [ expectedRootReal , serviceRootReal ] = await Promise . all ( [
14791480 tryRealpathOrResolve ( expectedRoot ) ,
@@ -2242,10 +2243,10 @@ async function maybeRestartService(params: {
22422243 } ) ;
22432244 if (
22442245 updatedInstallRestartNeedsServiceRootProof &&
2245- ! ( await gatewayServiceCommandUsesRoot ( {
2246+ ( await gatewayServiceCommandUsesRoot ( {
22462247 root : params . result . root ,
22472248 env : params . serviceEnv ,
2248- } ) )
2249+ } ) ) !== true
22492250 ) {
22502251 if ( ! params . opts . json ) {
22512252 defaultRuntime . log (
@@ -3820,7 +3821,7 @@ async function updateCommandInternal(opts: UpdateCommandOptions): Promise<void>
38203821 serviceState . installed &&
38213822 serviceState . loaded &&
38223823 preManagedServiceStop ?. stopped !== true &&
3823- serviceMatchesUpdateRoot !== true ;
3824+ serviceMatchesUpdateRoot === false ;
38243825 if (
38253826 shouldPrepareUpdatedInstallRestart ( {
38263827 updateMode : resultWithPostUpdate . mode ,
0 commit comments