@ctrl-spc/cli 1.1.8 → 1.1.9
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/launchd.js +7 -1
- package/package.json +1 -1
package/dist/launchd.js
CHANGED
|
@@ -126,11 +126,17 @@ export async function restartDaemon(home = homedir(), exec = defaultExec) {
|
|
|
126
126
|
throw new Error(RESTART_FAILED_MESSAGE);
|
|
127
127
|
const plistPath = writeDaemonPlist(home);
|
|
128
128
|
try {
|
|
129
|
+
exec('launchctl', bootoutArgs(uid, plistPath));
|
|
130
|
+
}
|
|
131
|
+
catch {
|
|
132
|
+
// Already stopped or not loaded; bootstrap below covers both cases.
|
|
133
|
+
}
|
|
134
|
+
try {
|
|
135
|
+
exec('launchctl', bootstrapArgs(uid, plistPath));
|
|
129
136
|
exec('launchctl', kickstartArgs(uid));
|
|
130
137
|
}
|
|
131
138
|
catch {
|
|
132
139
|
try {
|
|
133
|
-
exec('launchctl', bootstrapArgs(uid, plistPath));
|
|
134
140
|
exec('launchctl', kickstartArgs(uid));
|
|
135
141
|
}
|
|
136
142
|
catch {
|