Files
hapi/cli/src/daemon/install.ts
T
2025-12-16 15:03:50 +08:00

15 lines
525 B
TypeScript

import { logger } from '@/ui/logger';
import { install as installMac } from './mac/install';
export async function install(): Promise<void> {
if (process.platform !== 'darwin') {
throw new Error('Daemon installation is currently only supported on macOS');
}
if (process.getuid && process.getuid() !== 0) {
throw new Error('Daemon installation requires sudo privileges. Please run with sudo.');
}
logger.info('Installing Happy CLI daemon for macOS...');
await installMac();
}