chore: oxfmt doctor platform notes

This commit is contained in:
Peter Steinberger
2026-01-16 19:28:48 +00:00
parent 15b64ebfe8
commit c46dfc8411
2 changed files with 9 additions and 3 deletions

View File

@@ -38,7 +38,8 @@ async function launchctlGetenv(name: string): Promise<string | undefined> {
}
function hasConfigGatewayCreds(cfg: ClawdbotConfig): boolean {
const localToken = typeof cfg.gateway?.auth?.token === "string" ? cfg.gateway?.auth?.token.trim() : "";
const localToken =
typeof cfg.gateway?.auth?.token === "string" ? cfg.gateway?.auth?.token.trim() : "";
const localPassword =
typeof cfg.gateway?.auth?.password === "string" ? cfg.gateway?.auth?.password.trim() : "";
const remoteToken =
@@ -59,7 +60,9 @@ export async function noteMacLaunchctlGatewayEnvOverrides(cfg: ClawdbotConfig) {
const lines = [
"- launchctl environment overrides detected (can cause confusing unauthorized errors).",
envToken ? "- `CLAWDBOT_GATEWAY_TOKEN` is set; it overrides config tokens." : undefined,
envPassword ? "- `CLAWDBOT_GATEWAY_PASSWORD` is set; it overrides config passwords." : undefined,
envPassword
? "- `CLAWDBOT_GATEWAY_PASSWORD` is set; it overrides config passwords."
: undefined,
"- Clear overrides and restart the app/gateway:",
envToken ? " launchctl unsetenv CLAWDBOT_GATEWAY_TOKEN" : undefined,
envPassword ? " launchctl unsetenv CLAWDBOT_GATEWAY_PASSWORD" : undefined,

View File

@@ -26,7 +26,10 @@ import {
maybeScanExtraGatewayServices,
} from "./doctor-gateway-services.js";
import { noteSourceInstallIssues } from "./doctor-install.js";
import { noteMacLaunchAgentOverrides, noteMacLaunchctlGatewayEnvOverrides } from "./doctor-platform-notes.js";
import {
noteMacLaunchAgentOverrides,
noteMacLaunchctlGatewayEnvOverrides,
} from "./doctor-platform-notes.js";
import { createDoctorPrompter, type DoctorOptions } from "./doctor-prompter.js";
import { maybeRepairSandboxImages, noteSandboxScopeWarnings } from "./doctor-sandbox.js";
import { noteSecurityWarnings } from "./doctor-security.js";