(plistPath: string)
| 121 | } |
| 122 | |
| 123 | function launchctlUnload(plistPath: string): void { |
| 124 | try { |
| 125 | execSync(`launchctl bootout gui/${getUid()}/${SERVICE_LABEL}`, { stdio: 'pipe' }) |
| 126 | } catch { |
| 127 | try { |
| 128 | execSync(`launchctl unload "${plistPath}"`, { stdio: 'pipe' }) |
| 129 | } catch { |
| 130 | // already unloaded, ignore |
| 131 | } |
| 132 | } |
| 133 | } |
| 134 | |
| 135 | function installMacos(options: ServiceInstallOptions): void { |
| 136 | fs.mkdirSync(path.dirname(PLIST_PATH), { recursive: true }) |
no test coverage detected