(plistPath: string)
| 109 | } |
| 110 | |
| 111 | function launchctlLoad(plistPath: string): void { |
| 112 | try { |
| 113 | execSync(`launchctl bootstrap gui/${getUid()} "${plistPath}"`, { stdio: 'pipe' }) |
| 114 | } catch { |
| 115 | try { |
| 116 | execSync(`launchctl load "${plistPath}"`, { stdio: 'pipe' }) |
| 117 | } catch (err) { |
| 118 | throw new Error(`launchctl load failed: ${err instanceof Error ? err.message : err}`) |
| 119 | } |
| 120 | } |
| 121 | } |
| 122 | |
| 123 | function launchctlUnload(plistPath: string): void { |
| 124 | try { |
no test coverage detected