This commit is contained in:
@@ -0,0 +1,24 @@
|
||||
diff --git a/src/index.ts b/src/index.ts
|
||||
index a13dcab..f2f3942 100644
|
||||
--- a/src/index.ts
|
||||
+++ b/src/index.ts
|
||||
@@ -15,7 +15,18 @@ import {
|
||||
MockRTCAdminPlugin
|
||||
} from 'mockrtc';
|
||||
|
||||
-import updateCommand from '@oclif/plugin-update/lib/commands/update';
|
||||
+// Self-update is meaningless in a single self-contained binary: oclif's updater
|
||||
+// rewrites files inside an oclif install directory that doesn't exist here. Worse,
|
||||
+// importing it drags @oclif/plugin-update into the bundle, and that reads
|
||||
+// @oclif/command/package.json from disk when it loads - a path that only exists on
|
||||
+// the build machine, so the compiled binary dies at startup everywhere else.
|
||||
+// Back off for 6 hours like the EEXIT branch below, so the UI stops re-asking.
|
||||
+const updateCommand = {
|
||||
+ run: (_channel: string[]): Promise<void> => {
|
||||
+ console.log('Self-update is not supported in this build - download a new binary to update.');
|
||||
+ return delay(1000 * 60 * 60 * 6, { unref: true });
|
||||
+ }
|
||||
+};
|
||||
|
||||
import { HttpToolkitServerApi } from './api/api-server';
|
||||
import { checkBrowserConfig } from './browsers';
|
||||
Reference in New Issue
Block a user