@devries-cameron20 / t3code-1 / commits / a1c7b98f98
Fork 0

The best way to control Claude Code, Codex and more from any computer or phone

fix build script

Julius Marminge committed Mar 2, 2026 at 20:59 UTC a1c7b98f98b69242b50e9df2916d1d8161e9af48
1 file changed +12 -12
scripts/build-desktop-artifact.ts
+12 -12
@@ -10,7 +10,7 @@ import * as NodeRuntime from "@effect/platform-node/NodeRuntime";
10 import * as NodeServices from "@effect/platform-node/NodeServices";
11 import { Config, Data, Effect, FileSystem, Logger, Option, Path, Schema } from "effect";
12 import { Command, Flag } from "effect/unstable/cli";
13 -import { ChildProcess } from "effect/unstable/process";
13 +import { ChildProcess, ChildProcessSpawner } from "effect/unstable/process";
14
15 const BuildPlatform = Schema.Literals(["mac", "linux", "win"]);
16 const BuildArch = Schema.Literals(["arm64", "x64", "universal"]);
@@ -134,14 +134,12 @@ const AzureTrustedSigningOptionsConfig = Config.all({
134 endpoint: Config.string("AZURE_TRUSTED_SIGNING_ENDPOINT"),
135 certificateProfileName: Config.string("AZURE_TRUSTED_SIGNING_CERTIFICATE_PROFILE_NAME"),
136 codeSigningAccountName: Config.string("AZURE_TRUSTED_SIGNING_ACCOUNT_NAME"),
137 - fileDigest: Config.string("AZURE_TRUSTED_SIGNING_FILE_DIGEST").pipe(
138 - Config.withDefault(() => "SHA256"),
139 - ),
137 + fileDigest: Config.string("AZURE_TRUSTED_SIGNING_FILE_DIGEST").pipe(Config.withDefault("SHA256")),
138 timestampDigest: Config.string("AZURE_TRUSTED_SIGNING_TIMESTAMP_DIGEST").pipe(
141 - Config.withDefault(() => "SHA256"),
139 + Config.withDefault("SHA256"),
140 ),
141 timestampRfc3161: Config.string("AZURE_TRUSTED_SIGNING_TIMESTAMP_RFC3161").pipe(
144 - Config.withDefault(() => "http://timestamp.acs.microsoft.com"),
142 + Config.withDefault("http://timestamp.acs.microsoft.com"),
143 ),
144 });
145
@@ -151,10 +149,10 @@ const BuildEnvConfig = Config.all({
149 arch: Config.schema(BuildArch, "T3CODE_DESKTOP_ARCH").pipe(Config.option),
150 version: Config.string("T3CODE_DESKTOP_VERSION").pipe(Config.option),
151 outputDir: Config.string("T3CODE_DESKTOP_OUTPUT_DIR").pipe(Config.option),
154 - skipBuild: Config.boolean("T3CODE_DESKTOP_SKIP_BUILD").pipe(Config.withDefault(() => false)),
155 - keepStage: Config.boolean("T3CODE_DESKTOP_KEEP_STAGE").pipe(Config.withDefault(() => false)),
156 - signed: Config.boolean("T3CODE_DESKTOP_SIGNED").pipe(Config.withDefault(() => false)),
157 - verbose: Config.boolean("T3CODE_DESKTOP_VERBOSE").pipe(Config.withDefault(() => false)),
152 + skipBuild: Config.boolean("T3CODE_DESKTOP_SKIP_BUILD").pipe(Config.withDefault(false)),
153 + keepStage: Config.boolean("T3CODE_DESKTOP_KEEP_STAGE").pipe(Config.withDefault(false)),
154 + signed: Config.boolean("T3CODE_DESKTOP_SIGNED").pipe(Config.withDefault(false)),
155 + verbose: Config.boolean("T3CODE_DESKTOP_VERBOSE").pipe(Config.withDefault(false)),
156 });
157
158 const resolveBooleanFlag = (flag: Option.Option<boolean>, envValue: boolean) =>
@@ -209,11 +207,13 @@ const commandOutputOptions = (verbose: boolean) =>
207 }) as const;
208
209 const runCommand = Effect.fn(function* (command: ChildProcess.Command) {
212 - const exitCode = yield* ChildProcess.exitCode(command);
210 + const commandSpawner = yield* ChildProcessSpawner.ChildProcessSpawner;
211 + const child = yield* commandSpawner.spawn(command);
212 + const exitCode = yield* child.exitCode;
213
214 if (exitCode !== 0) {
215 return yield* new BuildScriptError({
216 - message: "Command exited with non-zero exit code",
216 + message: `Command exited with non-zero exit code (${exitCode})`,
217 });
218 }
219 });