relay-companion 0.1.589 → 0.1.591
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.
|
@@ -26,6 +26,14 @@ if (require.main === module) {
|
|
|
26
26
|
const [entry, mode, payload] = process.argv.slice(2);
|
|
27
27
|
if (!entry || mode !== "--worker" || !payload) throw Error("Missing update worker arguments");
|
|
28
28
|
const { stdio, logPath } = updateLogStdio();
|
|
29
|
+
// A job can outlive the release tree that named this entry. Say so once and
|
|
30
|
+
// exit cleanly instead of crashing on every relaunch.
|
|
31
|
+
if (!fs.existsSync(entry)) {
|
|
32
|
+
const line = `[relay-update] worker entry missing: ${entry}`;
|
|
33
|
+
console.error(line);
|
|
34
|
+
if (logPath) { try { fs.appendFileSync(logPath, `${line}\n`); } catch {} }
|
|
35
|
+
process.exit(0);
|
|
36
|
+
}
|
|
29
37
|
execute(process.execPath, entry, [mode, payload], { stdio }).catch(error => {
|
|
30
38
|
const line = `[relay-update] ${error.message}`;
|
|
31
39
|
console.error(line);
|
package/package.json
CHANGED