mirror of
https://github.com/openclaw/openclaw.git
synced 2026-08-25 03:45:46 -06:00
fix(macos): preserve externally owned attach-only gateway (#128134)
This commit is contained in:
committed by
GitHub
parent
69ae918783
commit
3cb52f4bb8
@@ -170,8 +170,8 @@ enum GatewayLaunchAgentManager {
|
||||
self.logger.info("launchd change skipped (remote mode)")
|
||||
return nil
|
||||
}
|
||||
if enabled, self.isLaunchAgentWriteDisabled() {
|
||||
self.logger.info("launchd enable skipped (disable marker set)")
|
||||
if self.isLaunchAgentWriteDisabled() {
|
||||
self.logger.info("launchd change skipped (disable marker set)")
|
||||
return nil
|
||||
}
|
||||
|
||||
|
||||
@@ -187,9 +187,19 @@ struct GatewayLaunchAgentManagerTests {
|
||||
GatewayLaunchAgentManager.clearTestingDaemonCommandCalls()
|
||||
|
||||
let error = GatewayLaunchAgentManager.applyAttachOnlyRuntimeOverride()
|
||||
let installError = await GatewayLaunchAgentManager.set(
|
||||
enabled: true,
|
||||
bundlePath: "/Applications/OpenClaw.app",
|
||||
port: 18789)
|
||||
let uninstallError = await GatewayLaunchAgentManager.set(
|
||||
enabled: false,
|
||||
bundlePath: "/Applications/OpenClaw.app",
|
||||
port: 18789)
|
||||
let kickstartError = await GatewayLaunchAgentManager.kickstart()
|
||||
|
||||
#expect(error == nil)
|
||||
#expect(installError == nil)
|
||||
#expect(uninstallError == nil)
|
||||
#expect(kickstartError == nil)
|
||||
#expect(FileManager().fileExists(atPath: marker.path))
|
||||
#expect(GatewayLaunchAgentManager.testingDaemonCommandCallsSnapshot().isEmpty)
|
||||
|
||||
Reference in New Issue
Block a user