The best way to control Claude Code, Codex and more from any computer or phone
fix(desktop): local desktop builds no longer crash when a GitHub token is in the shell (#19277)
Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
Dominik Engelhardt committed
Oct 18, 2026 at 21:33 UTC
37a08d312100a839441e5d98895b4efe29f1a93b
2 files changed
+22
-2
scripts/build-desktop-artifact.test.ts
+18
-2
@@ -363,8 +363,8 @@ it.layer(NodeServices.layer)("build-desktop-artifact", (it) => {
363
undefined,
364
);
365
366
- assert.notProperty(preview, "publish");
367
- assert.notProperty(previewChannel, "publish");
366
+ assert.isNull(preview.publish);
367
+ assert.isNull(previewChannel.publish);
368
assert.deepStrictEqual(release.publish, [
369
{
370
provider: "github",
@@ -382,6 +382,22 @@ it.layer(NodeServices.layer)("build-desktop-artifact", (it) => {
382
),
383
);
384
385
+ it.effect("disables electron-builder publish detection for local builds", () =>
386
+ Effect.gen(function* () {
387
+ const local = yield* createBuildConfig(
388
+ "mac",
389
+ "dmg",
390
+ "0.0.33",
391
+ false,
392
+ false,
393
+ undefined,
394
+ undefined,
395
+ );
396
+
397
+ assert.isNull(local.publish);
398
+ }).pipe(Effect.provide(ConfigProvider.layer(ConfigProvider.fromEnv({ env: {} })))),
399
+ );
400
+
401
it("stages only the desktop main-process externals", () => {
402
assert.deepStrictEqual(
403
resolveDesktopRuntimeDependencies(
scripts/build-desktop-artifact.ts
+4
@@ -2722,6 +2722,10 @@ export const createBuildConfig = Effect.fn("createBuildConfig")(function* (
2722
],
2723
};
2724
const updateChannel = resolveDesktopUpdateChannel(version);
2725
+ // A missing `publish` makes electron-builder infer a GitHub feed from
2726
+ // GH_TOKEN/GITHUB_TOKEN. The staged app has no repository to resolve it
2727
+ // against, so writing update manifests then crashes on a null config.
2728
+ buildConfig.publish = null;
2729
if (!isDesktopPreviewVersion(version)) {
2730
const publishConfig = yield* resolveGitHubPublishConfig(updateChannel);
2731
if (publishConfig) {