mirror of
https://github.com/wu736139669/hapi.git
synced 2026-11-08 01:43:07 +00:00
15 lines
525 B
TypeScript
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();
|
|
} |