Skip to content

Commit a67adf8

Browse files
Use --no-auto-update
1 parent e856567 commit a67adf8

2 files changed

Lines changed: 8 additions & 3 deletions

File tree

dotnet/src/FfiRuntimeHost.cs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -167,6 +167,9 @@ private static byte[] BuildArgvJson(string cliEntrypoint)
167167
}
168168
writer.WriteStringValue(cliEntrypoint);
169169
writer.WriteStringValue("--embedded-host");
170+
// Pin the worker to the bundled pkg matching the loaded cdylib, instead of
171+
// drifting to a newer version under the user's ~/.copilot/pkg (ABI skew).
172+
writer.WriteStringValue("--no-auto-update");
170173
writer.WriteEndArray();
171174
}
172175
return stream.ToArray();

nodejs/src/ffiRuntimeHost.ts

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -99,10 +99,12 @@ function loadLibrary(libraryPath: string): FfiLibrary {
9999

100100
function buildArgvJson(cliEntrypoint: string): Buffer {
101101
// A `.js` entrypoint is launched via node; the packaged single-file CLI binary
102-
// embeds its own Node and is invoked directly.
102+
// embeds its own Node and is invoked directly. `--no-auto-update` pins the worker
103+
// to the bundled pkg matching the loaded cdylib, instead of drifting to a newer
104+
// version installed under the user's `~/.copilot/pkg` (which would cause ABI skew).
103105
const argv = cliEntrypoint.toLowerCase().endsWith(".js")
104-
? ["node", cliEntrypoint, "--embedded-host"]
105-
: [cliEntrypoint, "--embedded-host"];
106+
? ["node", cliEntrypoint, "--embedded-host", "--no-auto-update"]
107+
: [cliEntrypoint, "--embedded-host", "--no-auto-update"];
106108
return Buffer.from(JSON.stringify(argv), "utf8");
107109
}
108110

0 commit comments

Comments
 (0)