@just-every/manager 0.1.71 → 0.1.74
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/lib/installer.js +14 -1
- package/package.json +1 -1
package/lib/installer.js
CHANGED
|
@@ -6,6 +6,7 @@ import {
|
|
|
6
6
|
mkdirSync,
|
|
7
7
|
readFileSync,
|
|
8
8
|
renameSync,
|
|
9
|
+
symlinkSync,
|
|
9
10
|
statSync,
|
|
10
11
|
unlinkSync,
|
|
11
12
|
writeFileSync,
|
|
@@ -467,9 +468,17 @@ function ensureServiceBinary(installerPath) {
|
|
|
467
468
|
mkdirSync(dataDir, { recursive: true });
|
|
468
469
|
}
|
|
469
470
|
try {
|
|
471
|
+
if (existsSync(binPath)) {
|
|
472
|
+
unlinkSync(binPath);
|
|
473
|
+
}
|
|
470
474
|
copyFileSync(installerPath, binPath);
|
|
471
475
|
} catch {
|
|
472
|
-
|
|
476
|
+
try {
|
|
477
|
+
ensureExecutable(installerPath);
|
|
478
|
+
symlinkSync(installerPath, binPath);
|
|
479
|
+
} catch {
|
|
480
|
+
return null;
|
|
481
|
+
}
|
|
473
482
|
}
|
|
474
483
|
ensureExecutable(binPath);
|
|
475
484
|
return binPath;
|
|
@@ -598,6 +607,10 @@ export function launchInstaller(installerPath, { mode = 'auto' } = {}) {
|
|
|
598
607
|
console.log('Run: sudo loginctl enable-linger $USER');
|
|
599
608
|
}
|
|
600
609
|
}
|
|
610
|
+
if (binaryPath === installerPath) {
|
|
611
|
+
console.log('Every Manager is pinned to the cached installer path.');
|
|
612
|
+
console.log('Ensure ~/.local/share/justevery/manager is writable, then rerun the installer to unpin.');
|
|
613
|
+
}
|
|
601
614
|
console.log('Every Manager is running in the background (systemd user service).');
|
|
602
615
|
return Promise.resolve();
|
|
603
616
|
}
|