openclaw/src/commands/doctor-platform-notes.ts
Peter Steinberger c379191f80 chore: migrate to oxlint and oxfmt
Co-authored-by: Christoph Nakazawa <christoph.pojer@gmail.com>
2026-01-14 15:02:19 +00:00

24 lines
711 B
TypeScript

import fs from "node:fs";
import os from "node:os";
import path from "node:path";
import { note } from "../terminal/note.js";
function resolveHomeDir(): string {
return process.env.HOME ?? os.homedir();
}
export async function noteMacLaunchAgentOverrides() {
if (process.platform !== "darwin") return;
const markerPath = path.join(resolveHomeDir(), ".clawdbot", "disable-launchagent");
const hasMarker = fs.existsSync(markerPath);
if (!hasMarker) return;
const lines = [
`- LaunchAgent writes are disabled via ${markerPath}.`,
"- To restore default behavior:",
` rm ${markerPath}`,
].filter((line): line is string => Boolean(line));
note(lines.join("\n"), "Gateway (macOS)");
}