@@ -600,7 +600,7 @@ public struct ProcessInvocation : AsyncSequence {
600600 } else {
601601 let execBasePath = getenv ( Constants . bridgePathEnvVarName) . flatMap { FilePath ( String ( cString: $0) ) }
602602 if !usePATH {
603- guard let execBasePath else {
603+ guard let execBasePath = execBasePath else {
604604 Conf . logger? . error ( " Cannot launch process and send its fd if \( Constants . bridgePathEnvVarName) is not set. " )
605605 try cleanupAndThrow ( Err . bridgePathEnvVarNotSet)
606606 }
@@ -695,7 +695,7 @@ public struct ProcessInvocation : AsyncSequence {
695695
696696 let additionalTerminationHandler : @Sendable ( Process ) -> Void = { _ in
697697 Conf . logger? . debug ( " Called in termination handler of process. " )
698- if let fdWhoseFgPgIDShouldBeSet {
698+ if let fdWhoseFgPgIDShouldBeSet = fdWhoseFgPgIDShouldBeSet {
699699 /* Let’s revert the fg pg ID back to our pg ID. */
700700 if tcsetpgrp ( fdWhoseFgPgIDShouldBeSet. rawValue, getpgrp ( ) ) != 0 && errno != ENOTTY {
701701 Conf . logger? . error ( " Failed setting foreground process group ID of controlling terminal of stdin back to our process group. " )
@@ -789,7 +789,7 @@ public struct ProcessInvocation : AsyncSequence {
789789 /* The executable is now launched.
790790 * We must not fail after this, so we wrap the rest of the function in a non-throwing block. */
791791 return {
792- if let fdWhoseFgPgIDShouldBeSet {
792+ if let fdWhoseFgPgIDShouldBeSet = fdWhoseFgPgIDShouldBeSet {
793793 if tcsetpgrp ( fdWhoseFgPgIDShouldBeSet. rawValue, getpgid ( p. processIdentifier) ) != 0 && errno != ENOTTY {
794794 Conf . logger? . error ( " Failed setting the foreground group ID to the child process group ID. " , metadata: [ " error " : " \( Errno ( rawValue: errno) ) " ] )
795795 }
0 commit comments