@jive-sh/skill-sync 0.2.3 → 0.2.4-latest-linux-x64

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/bin/skill-sync DELETED
@@ -1,579 +0,0 @@
1
- #!/usr/bin/env node
2
- "use strict";
3
- // CommonJS, not an ES module: a launcher is an extensionless file, and Node 14 and 16 refuse to load an
4
- // extensionless ES module in a "type": "module" package (ERR_UNKNOWN_FILE_EXTENSION; Node 18.20 accepts it). bin/package.json marks this directory
5
- // "commonjs", and the install script is install.cjs, so both load the same way on every Node and on Bun.
6
- const { spawnSync } = require("child_process");
7
- const {
8
- chmodSync,
9
- copyFileSync,
10
- existsSync,
11
- linkSync,
12
- mkdirSync,
13
- readdirSync,
14
- readFileSync,
15
- realpathSync,
16
- renameSync,
17
- rmSync,
18
- writeFileSync,
19
- } = require("fs");
20
- const { createHash } = require("crypto");
21
- const { homedir } = require("os");
22
- const { basename, dirname, join } = require("path");
23
-
24
- const PLATFORM_MAP = {
25
- "darwin-arm64": "darwin-arm64",
26
- "darwin-x64": "darwin-x64",
27
- "linux-arm64": "linux-arm64",
28
- "linux-x64": "linux-x64",
29
- "win32-x64": "windows-x64"
30
- };
31
- const PLATFORM_PACKAGES = {
32
- "darwin-arm64": "@jive-sh/skill-sync-darwin-arm64",
33
- "darwin-x64": "@jive-sh/skill-sync-darwin-x64",
34
- "linux-arm64": "@jive-sh/skill-sync-linux-arm64",
35
- "linux-x64": "@jive-sh/skill-sync-linux-x64",
36
- "windows-x64": "@jive-sh/skill-sync-windows-x64"
37
- };
38
- const PLATFORM_BINARIES = {
39
- "darwin-arm64": "multi-call-binary",
40
- "darwin-x64": "multi-call-binary",
41
- "linux-arm64": "multi-call-binary",
42
- "linux-x64": "multi-call-binary",
43
- "windows-x64": "multi-call-binary.exe"
44
- };
45
- const COMMANDS = [
46
- "skill-sync",
47
- "skill-sync-daemon"
48
- ];
49
- const PACKAGE_NAME = "@jive-sh/skill-sync";
50
- // Every src/daemons/ entry. The build refuses to produce a package where this disagrees with the files,
51
- // so it needs no checking here.
52
- const DAEMONS = [
53
- "skill-sync-daemon"
54
- ];
55
- const DAEMON_ID_PREFIX = "jive-daemon";
56
- const DAEMON_HOME_DIR = ".jive";
57
- const DAEMON_REGISTRY_SUBDIR = "daemons";
58
- const DAEMON_LOG_SUBDIR = "logs";
59
- const REPAIR_ONLY_FLAG = "--repair-only";
60
- const BIN_DIR = "bin";
61
- const INSTALL_SCRIPT = "install.cjs";
62
- // Root install.cjs repairs command targets; bin launchers repair and then execute.
63
- const IS_INSTALL_SCRIPT = false;
64
- const WINDOWS_EXECUTABLE_SUFFIX = ".exe";
65
- const INSTALLED_JSON = "installed.json";
66
-
67
- // The real path: reached through a link in a bin directory, the package is wherever the link points.
68
- const launcherPath = realpathSync(__filename);
69
- const launcherDir = dirname(launcherPath);
70
- const packageDir = IS_INSTALL_SCRIPT ? launcherDir : dirname(launcherDir);
71
- const commandTargetDir = join(packageDir, BIN_DIR);
72
- const rootInstallScriptPath = join(packageDir, INSTALL_SCRIPT);
73
-
74
- function fail(message) {
75
- console.error(message);
76
- process.exit(1);
77
- }
78
-
79
- function currentPlatformKey() {
80
- const platformKey = PLATFORM_MAP[`${process.platform}-${process.arch}`];
81
- if (!platformKey) {
82
- fail(`Unsupported platform: ${process.platform}-${process.arch}`);
83
- }
84
- return platformKey;
85
- }
86
-
87
- function currentPlatformPackageName() {
88
- const platformKey = currentPlatformKey();
89
- const packageName = PLATFORM_PACKAGES[platformKey];
90
- if (!packageName) {
91
- fail(`No platform package is configured for ${platformKey}`);
92
- }
93
- return packageName;
94
- }
95
-
96
- /**
97
- * When a Jive library contains any number of CLIs (entrypoints or agents), then the base package
98
- * will have an optional dependency for each possible architecture, with those platform-specific
99
- * packages containing a platform build of the CLI.
100
- * @returns the path to the platform binary and the exact version of the platform package.
101
- */
102
- function currentPlatformPackage() {
103
- const platformKey = currentPlatformKey();
104
- const binaryFile = PLATFORM_BINARIES[platformKey];
105
- if (!binaryFile) {
106
- fail(`No platform binary is configured for ${platformKey}`);
107
- }
108
-
109
- const packageName = currentPlatformPackageName();
110
- try {
111
- const packageJsonPath = require.resolve(`${packageName}/package.json`);
112
- const packageDir = dirname(packageJsonPath);
113
- const packageJson = JSON.parse(readFileSync(packageJsonPath, "utf-8"));
114
- return {
115
- binaryPath: join(packageDir, binaryFile),
116
- version: packageJson.version,
117
- };
118
- } catch (error) {
119
- fail(`Could not resolve optional platform package ${packageName}. Reinstall dependencies for ${process.platform}-${process.arch}.`);
120
- }
121
- }
122
-
123
- function commandTargetPath(command) {
124
- const suffix = process.platform === "win32" ? WINDOWS_EXECUTABLE_SUFFIX : "";
125
- return join(commandTargetDir, `${command}${suffix}`);
126
- }
127
-
128
- function installedJsonPath() {
129
- return join(commandTargetDir, INSTALLED_JSON);
130
- }
131
-
132
- function windowsTargetsAreCurrent(version) {
133
- if (process.platform !== "win32") return false;
134
- if (!COMMANDS.every((command) => existsSync(commandTargetPath(command)))) return false;
135
-
136
- try {
137
- const installed = JSON.parse(readFileSync(installedJsonPath(), "utf-8"));
138
- return installed.version === version;
139
- } catch {
140
- return false;
141
- }
142
- }
143
-
144
- function linkOrCopyFirstExecutable(sourcePath, targetPath) {
145
- mkdirSync(dirname(targetPath), { recursive: true });
146
- const tempPath = `${targetPath}.${process.pid}.${Date.now()}.tmp${process.platform === "win32" ? WINDOWS_EXECUTABLE_SUFFIX : ""}`;
147
- rmSync(tempPath, { force: true });
148
-
149
- try {
150
- try {
151
- linkSync(sourcePath, tempPath);
152
- } catch {
153
- copyFileSync(sourcePath, tempPath);
154
- }
155
-
156
- chmodSync(tempPath, 0o755);
157
- rmSync(targetPath, { force: true });
158
- renameSync(tempPath, targetPath);
159
- } finally {
160
- rmSync(tempPath, { force: true });
161
- }
162
- }
163
-
164
- function hardLinkCommandTarget(sourcePath, targetPath) {
165
- if (sourcePath === targetPath) return;
166
-
167
- const tempPath = `${targetPath}.${process.pid}.${Date.now()}.tmp${process.platform === "win32" ? WINDOWS_EXECUTABLE_SUFFIX : ""}`;
168
- rmSync(tempPath, { force: true });
169
-
170
- try {
171
- linkSync(sourcePath, tempPath);
172
- chmodSync(tempPath, 0o755);
173
- rmSync(targetPath, { force: true });
174
- renameSync(tempPath, targetPath);
175
- } finally {
176
- rmSync(tempPath, { force: true });
177
- }
178
- }
179
-
180
- function repairCommandTargets() {
181
- const platformPackage = currentPlatformPackage();
182
-
183
- if (windowsTargetsAreCurrent(platformPackage.version)) {
184
- return;
185
- }
186
-
187
- const firstTargetPath = commandTargetPath(COMMANDS[0]);
188
- linkOrCopyFirstExecutable(platformPackage.binaryPath, firstTargetPath);
189
-
190
- for (const command of COMMANDS.slice(1)) {
191
- hardLinkCommandTarget(firstTargetPath, commandTargetPath(command));
192
- }
193
-
194
- if (process.platform === "win32") {
195
- writeFileSync(installedJsonPath(), `${JSON.stringify({ version: platformPackage.version }, null, 2)}\n`);
196
- }
197
- }
198
-
199
- function runExecutable(executablePath) {
200
- const result = spawnSync(executablePath, process.argv.slice(2), { stdio: "inherit" });
201
-
202
- if (result.error) {
203
- fail(result.error.message);
204
- }
205
- if (result.status !== 0) {
206
- process.exit(result.status ?? 1);
207
- }
208
- }
209
-
210
- function removeInstallScript() {
211
- try {
212
- rmSync(rootInstallScriptPath, { force: true });
213
- // TODO: should we also remove the postinstall script line from package.json?
214
- } catch {
215
- // Cleanup is best-effort; failing to remove install.cjs should not fail package installation.
216
- }
217
- }
218
-
219
- /* ------------------------------------------------------------------ daemon registration ---------- */
220
-
221
- /**
222
- * Registering a package's daemons with the operating system so they start at login.
223
- *
224
- * At login, not at boot: a daemon here acts for one user, with access to that user's keychain, SSH agent
225
- * and home directory, and a system-wide service would have none of those. On Windows that is a scheduled
226
- * task rather than a service for the same reason — a service runs in session 0, isolated from the desktop
227
- * the user is actually logged into.
228
- *
229
- * This runs in the installer, which is plain JavaScript, because it has to run on a machine that has only
230
- * just received the package. The daemon binary cannot register itself: nothing has started it yet.
231
- */
232
-
233
- function jiveHome() {
234
- return join(homedir(), DAEMON_HOME_DIR);
235
- }
236
-
237
- function registryDir() {
238
- return join(jiveHome(), DAEMON_REGISTRY_SUBDIR);
239
- }
240
-
241
- function logDir() {
242
- return join(jiveHome(), DAEMON_LOG_SUBDIR);
243
- }
244
-
245
- function recordPath(id) {
246
- return join(registryDir(), `${id}.json`);
247
- }
248
-
249
- /**
250
- * The tree this copy of the package was installed into, which is where its daemons should work.
251
- *
252
- * Derived from the path rather than from INIT_CWD, which npm sets and Bun does not, and which answers the
253
- * wrong question anyway: where the install was *typed*, not what it installed into. Walking out of the
254
- * enclosing node_modules answers it for a project install and a global one alike, and a package with no
255
- * node_modules above it — one built and installed in place — is its own root.
256
- */
257
- function installRoot() {
258
- let dir = packageDir;
259
- while (true) {
260
- if (basename(dir) === "node_modules") return dirname(dir);
261
- const parent = dirname(dir);
262
- if (parent === dir) return packageDir;
263
- dir = parent;
264
- }
265
- }
266
-
267
- /**
268
- * The id a registration is replaced at: the package's name, the daemon's name, and a digest of the
269
- * directory this copy of the package was installed into.
270
- *
271
- * **Where the package is installed is what decides how many of its daemons exist.** Reinstalling or
272
- * upgrading the same copy keeps the id, so the registration is replaced; a second copy installed somewhere
273
- * else gets its own id, so each project that installs its own copy gets its own daemon and a globally
274
- * installed copy gets exactly one.
275
- *
276
- * An earlier version had each daemon declare `local` or `global` in the manifest instead. That was a
277
- * second source of truth that contradicted the real one: a `global` daemon installed into two projects
278
- * registered once, pointing at whichever installed last, so uninstalling the second took the first
279
- * project's daemon away — the very failure `local` existed to prevent.
280
- */
281
- /** One id segment: dots separate segments, so a dot inside a name cannot be left as one. */
282
- function idSegment(value) {
283
- return value.replace(/[^A-Za-z0-9-]+/g, "-");
284
- }
285
-
286
- /**
287
- * Scope and name get a segment each, and an unscoped package gets "_" where its scope would be.
288
- *
289
- * Joining them with a dash instead would not be reversible: `@ozyman42/ozy-cli` and a package actually
290
- * named `ozyman42-ozy-cli` would produce the same text. "_" is safe as the marker because npm forbids a
291
- * scope or name from starting with it, so no real scope can collide with it.
292
- */
293
- function packageSegments() {
294
- if (!PACKAGE_NAME.startsWith("@")) return ["_", idSegment(PACKAGE_NAME)];
295
- const separator = PACKAGE_NAME.indexOf("/");
296
- return [
297
- idSegment(PACKAGE_NAME.slice(1, separator)),
298
- idSegment(PACKAGE_NAME.slice(separator + 1)),
299
- ];
300
- }
301
-
302
- function daemonId(name) {
303
- const [scope, packageName] = packageSegments();
304
- const installDigest = createHash("sha256").update(packageDir).digest("hex").slice(0, 10);
305
- return `${DAEMON_ID_PREFIX}.${scope}.${packageName}.${idSegment(name)}.${installDigest}`;
306
- }
307
-
308
- function run(argv, allowFailure) {
309
- const result = spawnSync(argv[0], argv.slice(1), { stdio: ["ignore", "ignore", "pipe"] });
310
- if (result.error || result.status !== 0) {
311
- if (!allowFailure) {
312
- const detail = result.error ? result.error.message : String(result.stderr || "").trim();
313
- console.error(` ${argv.join(" ")} failed: ${detail}`);
314
- }
315
- return false;
316
- }
317
- return true;
318
- }
319
-
320
- function xmlEscape(value) {
321
- return String(value)
322
- .split("&").join("&")
323
- .split("<").join("&lt;")
324
- .split(">").join("&gt;");
325
- }
326
-
327
- /**
328
- * launchd. KeepAlive on SuccessfulExit=false restarts a daemon that crashes but respects one that exits
329
- * zero, which is how a daemon that has removed its own registration stays stopped.
330
- */
331
- function registerLaunchd(id, name, executable, workingDirectory, logPath) {
332
- // The id verbatim, rather than a reverse-DNS label: one string names this daemon on every platform.
333
- const label = id;
334
- const agentsDir = join(homedir(), "Library", "LaunchAgents");
335
- const plistPath = join(agentsDir, `${label}.plist`);
336
- const domain = `gui/${process.getuid()}`;
337
- const unregister = ["launchctl", "bootout", `${domain}/${label}`];
338
-
339
- mkdirSync(agentsDir, { recursive: true });
340
- writeFileSync(plistPath, [
341
- '<?xml version="1.0" encoding="UTF-8"?>',
342
- '<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">',
343
- '<plist version="1.0">',
344
- "<dict>",
345
- ` <key>Label</key><string>${xmlEscape(label)}</string>`,
346
- ` <key>ProgramArguments</key><array><string>${xmlEscape(executable)}</string></array>`,
347
- ` <key>WorkingDirectory</key><string>${xmlEscape(workingDirectory)}</string>`,
348
- " <key>RunAtLoad</key><true/>",
349
- " <key>KeepAlive</key><dict><key>SuccessfulExit</key><false/></dict>",
350
- ` <key>StandardOutPath</key><string>${xmlEscape(logPath)}</string>`,
351
- ` <key>StandardErrorPath</key><string>${xmlEscape(logPath)}</string>`,
352
- " <key>ProcessType</key><string>Background</string>",
353
- "</dict>",
354
- "</plist>",
355
- "",
356
- ].join("\n"));
357
-
358
- // Booting out first: bootstrap refuses a label that is already loaded, and a reinstall is the common case.
359
- // bootout returns before launchd has finished stopping a daemon that is running, and bootstrap is refused
360
- // until it has ("Bootstrap failed: 5"), so a reinstall over a live daemon left it stopped until the next
361
- // login. Retry for a few seconds; only the last failure is reported.
362
- run(unregister, true);
363
- const attempts = 20;
364
- let started = false;
365
- for (let attempt = 1; attempt <= attempts && !started; attempt++) {
366
- if (attempt > 1) Atomics.wait(new Int32Array(new SharedArrayBuffer(4)), 0, 0, 250);
367
- started = run(["launchctl", "bootstrap", domain, plistPath], attempt < attempts);
368
- }
369
- return { kind: "launchd", unit: label, files: [plistPath], unregister, started };
370
- }
371
-
372
- /** systemd user units. `--user` rather than system units, for the same reason launchd gets a LaunchAgent. */
373
- function registerSystemd(id, name, executable, workingDirectory, logPath) {
374
- const unit = `${id}.service`;
375
- const unitDir = join(process.env.XDG_CONFIG_HOME || join(homedir(), ".config"), "systemd", "user");
376
- const unitPath = join(unitDir, unit);
377
- const unregister = ["systemctl", "--user", "disable", "--now", unit];
378
-
379
- mkdirSync(unitDir, { recursive: true });
380
- writeFileSync(unitPath, [
381
- "[Unit]",
382
- `Description=Jive daemon ${name} for ${PACKAGE_NAME}`,
383
- "",
384
- "[Service]",
385
- "Type=simple",
386
- `ExecStart=${executable}`,
387
- `WorkingDirectory=${workingDirectory}`,
388
- "Restart=on-failure",
389
- "RestartSec=5",
390
- "",
391
- "[Install]",
392
- "WantedBy=default.target",
393
- "",
394
- ].join("\n"));
395
-
396
- run(["systemctl", "--user", "daemon-reload"], true);
397
- const started = run(["systemctl", "--user", "enable", "--now", unit], false);
398
- return { kind: "systemd", unit, files: [unitPath], unregister, started };
399
- }
400
-
401
- /**
402
- * Windows Task Scheduler, through a .cmd shim.
403
- *
404
- * The shim exists because schtasks can set neither a working directory nor environment variables, and it
405
- * also supplies the restart-on-crash behaviour the other two platforms get from their service manager: an
406
- * ONLOGON task starts its program once and does not watch it. The loop mirrors launchd's KeepAlive, so a
407
- * daemon that exits zero after removing itself is not restarted.
408
- */
409
- function registerScheduledTask(id, name, executable, workingDirectory, logPath) {
410
- const taskName = id;
411
- const shimPath = join(registryDir(), `${id}.cmd`);
412
- const unregister = ["schtasks", "/Delete", "/F", "/TN", taskName];
413
-
414
- writeFileSync(shimPath, [
415
- "@echo off",
416
- `cd /d "${workingDirectory}"`,
417
- ":jive_loop",
418
- `"${executable}" >> "${logPath}" 2>&1`,
419
- "if %ERRORLEVEL% EQU 0 goto :eof",
420
- "timeout /t 5 /nobreak > nul",
421
- "goto jive_loop",
422
- "",
423
- ].join("\r\n"));
424
-
425
- const started = run([
426
- "schtasks", "/Create", "/F",
427
- "/SC", "ONLOGON",
428
- "/TN", taskName,
429
- "/TR", `"${shimPath}"`,
430
- "/RL", "LIMITED",
431
- ], false);
432
- return { kind: "scheduled-task", unit: taskName, files: [shimPath], unregister, started };
433
- }
434
-
435
- const DAEMON_REGISTRARS = {
436
- darwin: registerLaunchd,
437
- linux: registerSystemd,
438
- win32: registerScheduledTask,
439
- };
440
-
441
- function readRecord(path) {
442
- try {
443
- return JSON.parse(readFileSync(path, "utf-8"));
444
- } catch {
445
- return undefined;
446
- }
447
- }
448
-
449
- function removeRegistration(record, reason) {
450
- console.log(`Removing daemon ${record.id} (${reason})`);
451
- if (Array.isArray(record.unregister) && record.unregister.length > 0) {
452
- run(record.unregister, true);
453
- }
454
- for (const file of record.files || []) {
455
- rmSync(file, { force: true });
456
- }
457
- }
458
-
459
- /**
460
- * Drops this package's registrations that should no longer exist.
461
- *
462
- * Three cases, all of which would otherwise leave the operating system starting a missing or unwanted
463
- * executable at every login: a daemon this version of the package no longer has, a copy of the package
464
- * whose directory is gone, and a registration of this very copy under an id we no longer use — which is
465
- * what makes a change to the id scheme replace its registrations instead of doubling them.
466
- *
467
- * Only this package's own registrations are considered, by name, so another package's daemon is never
468
- * touched; and only this copy's, except where the copy itself has been deleted.
469
- */
470
- function pruneRemovedDaemons(currentIds) {
471
- let entries;
472
- try {
473
- entries = readdirSync(registryDir());
474
- } catch {
475
- return;
476
- }
477
-
478
- for (const entry of entries) {
479
- if (!entry.endsWith(".json")) continue;
480
- const path = join(registryDir(), entry);
481
- const record = readRecord(path);
482
- if (!record || record.packageName !== PACKAGE_NAME) continue;
483
-
484
- const reason =
485
- !DAEMONS.includes(record.name) ? `no longer part of ${PACKAGE_NAME}`
486
- : !existsSync(record.packageDir) ? `${record.packageDir} is gone`
487
- : record.packageDir === packageDir && !currentIds.includes(record.id) ? "superseded by a new id"
488
- : undefined;
489
- if (reason === undefined) continue;
490
-
491
- removeRegistration(record, reason);
492
- rmSync(path, { force: true });
493
- }
494
- }
495
-
496
- function registerDaemons() {
497
- // Two reasons not to register. The caller asked for repair alone — the local deploy does, because its
498
- // install exists so the launcher can resolve a platform package, not because anyone chose to install
499
- // that copy. Or this is a build agent, which installs a package to run one command and is then
500
- // discarded: registering something to start at a login that will never happen is pure noise, and in a
501
- // container it fails outright.
502
- const skip = IS_INSTALL_SCRIPT && process.argv.includes(REPAIR_ONLY_FLAG) ? `${REPAIR_ONLY_FLAG} was passed`
503
- : process.env.CI ? "CI is set"
504
- : undefined;
505
- const names = skip === undefined ? DAEMONS : [];
506
-
507
- // Pruning first, and with no current ids when skipping: declining to run daemons here has to also take
508
- // away any this copy registered earlier, or one such install would leave them starting at every login
509
- // forever. Before the early return below, too — a version that drops its last daemon still has to take
510
- // the previous version's registration away, and the record carries everything undoing it needs.
511
- pruneRemovedDaemons(names.map(daemonId));
512
- if (skip !== undefined) {
513
- if (DAEMONS.length > 0) console.log(`${skip} — not registering ${DAEMONS.join(", ")}`);
514
- return;
515
- }
516
- if (names.length === 0) return;
517
-
518
- const registrar = DAEMON_REGISTRARS[process.platform];
519
- if (!registrar) {
520
- console.log(`No daemon support for ${process.platform} — ${names.join(", ")} will not start automatically`);
521
- return;
522
- }
523
-
524
- mkdirSync(registryDir(), { recursive: true });
525
- mkdirSync(logDir(), { recursive: true });
526
-
527
- for (const name of names) {
528
- const id = daemonId(name);
529
- const path = recordPath(id);
530
- const previous = readRecord(path);
531
- const workingDirectory = installRoot();
532
- const executable = commandTargetPath(name);
533
- const logPath = join(logDir(), `${id}.log`);
534
-
535
- console.log(
536
- `${previous ? "Replacing existing" : "Creating"} daemon ${id}`
537
- + ` (${name} from ${PACKAGE_NAME}) in ${workingDirectory}`,
538
- );
539
-
540
- // The record goes down before the unit is loaded, because loading it starts the daemon, and the first
541
- // thing the daemon does is read this file to find out how it was registered.
542
- const pending = {
543
- id,
544
- name,
545
- packageName: PACKAGE_NAME,
546
- packageDir,
547
- workingDirectory,
548
- executable,
549
- registeredAt: new Date().toISOString(),
550
- files: [path],
551
- unregister: previous && previous.unregister ? previous.unregister : [],
552
- };
553
- writeFileSync(path, `${JSON.stringify(pending, null, 2)}\n`);
554
-
555
- const outcome = registrar(id, name, executable, workingDirectory, logPath);
556
- // kind and unit are recorded for the sake of reading a daemon's status later: they are what a listing
557
- // command has to ask the platform about, and only the installer knows which registrar ran.
558
- writeFileSync(path, `${JSON.stringify({
559
- ...pending,
560
- kind: outcome.kind,
561
- unit: outcome.unit,
562
- logPath,
563
- files: [...outcome.files, path],
564
- unregister: outcome.unregister,
565
- }, null, 2)}\n`);
566
-
567
- if (!outcome.started) {
568
- console.error(` ${id} is registered but could not be started; it will start at your next login`);
569
- }
570
- }
571
- }
572
-
573
- repairCommandTargets();
574
- registerDaemons();
575
- removeInstallScript();
576
- if (!IS_INSTALL_SCRIPT) {
577
- const commandName = basename(launcherPath);
578
- runExecutable(commandTargetPath(commandName));
579
- }