Something went wrong. Try again.
Something went wrong. Try again.
123456789101112131415161718192021222324import { loadConfig } from '../config.js';import { trustCaddyCert } from '../docker.js';import * as d from '../utils/display.js';
export async function trustCommand() { const config = loadConfig();
if (process.platform !== 'darwin') { d.warn('Auto-trust is only supported on macOS'); d.info('On Linux, extract the cert manually:'); d.info(` docker compose -f ${config.composeFile} cp caddy:/data/caddy/pki/authorities/local/root.crt ./caddy-root.crt`); return; }
d.info('Trusting Caddy root CA (you may be prompted for your password)...'); try { trustCaddyCert(config); d.success('Caddy root CA trusted'); } catch (e: any) { d.error(`Failed: ${e.message}`); } d.line();}