import { execFileSync as defaultExecFileSync } from 'node:child_process';
import { platform as defaultPlatform } from 'node:os';
const PLATFORM_COMMANDS = {
    linux: 'xdg-open',
    darwin: 'open',
    win32: 'start',
};
export function openInBrowser(url, deps = { platform: defaultPlatform(), execFileSync: defaultExecFileSync }) {
    const command = PLATFORM_COMMANDS[deps.platform];
    if (!command)
        return;
    try {
        deps.execFileSync(command, [url]);
    }
    catch {
        // silently ignore — missing xdg-open or similar should not crash the CLI
    }
}
//# sourceMappingURL=browserOpener.js.map