mirror of
https://github.com/openclaw/openclaw.git
synced 2026-05-09 09:47:40 +00:00
refactor(commands): split CLI commands
This commit is contained in:
27
src/commands/doctor-platform-notes.ts
Normal file
27
src/commands/doctor-platform-notes.ts
Normal file
@@ -0,0 +1,27 @@
|
||||
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)");
|
||||
}
|
||||
Reference in New Issue
Block a user