Skip to content

Open-source Grok Bot alternative for named AI teammates. Local-first desktop, web, and mobile clients with per-bot tools, instructions, and memory. Independent fork of T3 Code.

fix build script

Julius Marmingea1c7b98f98b6
diff --git a/scripts/build-desktop-artifact.ts b/scripts/build-desktop-artifact.ts
index 76f926549..a54bd41d0 100644
--- a/scripts/build-desktop-artifact.ts
+++ b/scripts/build-desktop-artifact.ts
@@ -10,7 +10,7 @@ import * as NodeRuntime from "@effect/platform-node/NodeRuntime";
import * as NodeServices from "@effect/platform-node/NodeServices";
import { Config, Data, Effect, FileSystem, Logger, Option, Path, Schema } from "effect";
import { Command, Flag } from "effect/unstable/cli";
-import { ChildProcess } from "effect/unstable/process";
+import { ChildProcess, ChildProcessSpawner } from "effect/unstable/process";
const BuildPlatform = Schema.Literals(["mac", "linux", "win"]);
const BuildArch = Schema.Literals(["arm64", "x64", "universal"]);
@@ -134,14 +134,12 @@ const AzureTrustedSigningOptionsConfig = Config.all({
endpoint: Config.string("AZURE_TRUSTED_SIGNING_ENDPOINT"),
certificateProfileName: Config.string("AZURE_TRUSTED_SIGNING_CERTIFICATE_PROFILE_NAME"),
codeSigningAccountName: Config.string("AZURE_TRUSTED_SIGNING_ACCOUNT_NAME"),
- fileDigest: Config.string("AZURE_TRUSTED_SIGNING_FILE_DIGEST").pipe(
- Config.withDefault(() => "SHA256"),
- ),
+ fileDigest: Config.string("AZURE_TRUSTED_SIGNING_FILE_DIGEST").pipe(Config.withDefault("SHA256")),
timestampDigest: Config.string("AZURE_TRUSTED_SIGNING_TIMESTAMP_DIGEST").pipe(
- Config.withDefault(() => "SHA256"),
+ Config.withDefault("SHA256"),
),
timestampRfc3161: Config.string("AZURE_TRUSTED_SIGNING_TIMESTAMP_RFC3161").pipe(
- Config.withDefault(() => "http://timestamp.acs.microsoft.com"),
+ Config.withDefault("http://timestamp.acs.microsoft.com"),
),
});
@@ -151,10 +149,10 @@ const BuildEnvConfig = Config.all({
arch: Config.schema(BuildArch, "T3CODE_DESKTOP_ARCH").pipe(Config.option),
version: Config.string("T3CODE_DESKTOP_VERSION").pipe(Config.option),
outputDir: Config.string("T3CODE_DESKTOP_OUTPUT_DIR").pipe(Config.option),
- skipBuild: Config.boolean("T3CODE_DESKTOP_SKIP_BUILD").pipe(Config.withDefault(() => false)),
- keepStage: Config.boolean("T3CODE_DESKTOP_KEEP_STAGE").pipe(Config.withDefault(() => false)),
- signed: Config.boolean("T3CODE_DESKTOP_SIGNED").pipe(Config.withDefault(() => false)),
- verbose: Config.boolean("T3CODE_DESKTOP_VERBOSE").pipe(Config.withDefault(() => false)),
+ skipBuild: Config.boolean("T3CODE_DESKTOP_SKIP_BUILD").pipe(Config.withDefault(false)),
+ keepStage: Config.boolean("T3CODE_DESKTOP_KEEP_STAGE").pipe(Config.withDefault(false)),
+ signed: Config.boolean("T3CODE_DESKTOP_SIGNED").pipe(Config.withDefault(false)),
+ verbose: Config.boolean("T3CODE_DESKTOP_VERBOSE").pipe(Config.withDefault(false)),
});
const resolveBooleanFlag = (flag: Option.Option<boolean>, envValue: boolean) =>
@@ -209,11 +207,13 @@ const commandOutputOptions = (verbose: boolean) =>
}) as const;
const runCommand = Effect.fn(function* (command: ChildProcess.Command) {
- const exitCode = yield* ChildProcess.exitCode(command);
+ const commandSpawner = yield* ChildProcessSpawner.ChildProcessSpawner;
+ const child = yield* commandSpawner.spawn(command);
+ const exitCode = yield* child.exitCode;
if (exitCode !== 0) {
return yield* new BuildScriptError({
- message: "Command exited with non-zero exit code",
+ message: `Command exited with non-zero exit code (${exitCode})`,
});
}
});