rigjs
Version:
A multi-repos dev tool based on yarn and git.Rigjs is intended to be the simplest way to develop,share and deliver codes between different developers or different projects.
17 lines (15 loc) • 514 B
text/typescript
import fs from 'fs';
import { spawnSync } from 'child_process';
import print from '../../print';
import { paths } from '../paths';
import { requireMacOS } from '../platform';
export default function daemonStop(): void {
requireMacOS();
if (!fs.existsSync(paths.launchAgent)) {
print.info('no launchd agent installed');
return;
}
const uid = process.getuid?.() ?? 0;
spawnSync('launchctl', ['bootout', `gui/${uid}`, paths.launchAgent], { stdio: 'inherit' });
print.succeed('daemon stopped');
}