fix: prefer ~ for home paths in output

This commit is contained in:
Peter Steinberger
2026-01-23 03:43:32 +00:00
parent 34bb7250f8
commit 7f68bf79b6
44 changed files with 245 additions and 152 deletions

View File

@@ -20,6 +20,7 @@ import type { RuntimeEnv } from "../runtime.js";
import { defaultRuntime } from "../runtime.js";
import { note } from "../terminal/note.js";
import { stylePromptTitle } from "../terminal/prompt-style.js";
import { shortenHomePath } from "../utils.js";
import { maybeRepairAnthropicOAuthProfileId, noteAuthProfileHealth } from "./doctor-auth.js";
import { loadAndMaybeMigrateDoctorConfig } from "./doctor-config-flow.js";
import { maybeRepairGatewayDaemon } from "./doctor-gateway-daemon-flow.js";
@@ -269,10 +270,10 @@ export async function doctorCommand(
if (shouldWriteConfig) {
cfg = applyWizardMetadata(cfg, { command: "doctor", mode: resolveMode(cfg) });
await writeConfigFile(cfg);
runtime.log(`Updated ${CONFIG_PATH_CLAWDBOT}`);
runtime.log(`Updated ${shortenHomePath(CONFIG_PATH_CLAWDBOT)}`);
const backupPath = `${CONFIG_PATH_CLAWDBOT}.bak`;
if (fs.existsSync(backupPath)) {
runtime.log(`Backup: ${backupPath}`);
runtime.log(`Backup: ${shortenHomePath(backupPath)}`);
}
} else {
runtime.log(`Run "${formatCliCommand("clawdbot doctor --fix")}" to apply changes.`);