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.
18 lines (16 loc) • 568 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 daemonUninstall(): void {
requireMacOS();
const uid = process.getuid?.() ?? 0;
if (fs.existsSync(paths.launchAgent)) {
spawnSync('launchctl', ['bootout', `gui/${uid}`, paths.launchAgent], { stdio: 'ignore' });
fs.rmSync(paths.launchAgent);
print.succeed(`removed ${paths.launchAgent}`);
} else {
print.info('no launchd agent installed');
}
}