The best way to control Claude Code, Codex and more from any computer or phone
Mirrored from https://github.com/Camo67/t3code.git
Synced Nov 25, 03:45 UTC
dont fail if env-file is unspecified
Julius Marminge committed
Jun 4, 2026 at 20:12 UTC
295b9db113058d33306f9f599d8077710a293f43
1 file changed
+11
-4
infra/relay/scripts/deploy.ts
+11
-4
@@ -74,9 +74,14 @@ const loadDeployConfigProvider = Effect.fn("relay.deploy.loadConfigProvider")(fu
74
) {
75
const path = yield* Path.Path;
76
const root = yield* relayRoot;
77
- const selectedEnvFile = Option.getOrUndefined(envFileOverride);
78
- const envFile = selectedEnvFile ? path.resolve(root, selectedEnvFile) : path.join(root, ".env");
79
- return yield* ConfigProvider.fromDotEnv({ path: envFile });
77
+
78
+ if (Option.isSome(envFileOverride)) {
79
+ return yield* ConfigProvider.fromDotEnv({ path: path.resolve(root, envFileOverride.value) });
80
+ }
81
+
82
+ return yield* ConfigProvider.fromDotEnv({ path: path.join(root, ".env") }).pipe(
83
+ Effect.catch(() => Effect.succeed(ConfigProvider.fromEnv())),
84
+ );
85
});
86
87
const relayDeployStage = Config.nonEmptyString("stage").pipe(
@@ -184,7 +189,9 @@ export const relayDeployCommand = Command.make(
189
Flag.withDefault(false),
190
),
191
envFile: Flag.string("env-file").pipe(
187
- Flag.withDescription("Environment file to load. Defaults to infra/relay/.env."),
192
+ Flag.withDescription(
193
+ "Environment file to load. Defaults to infra/relay/.env with process env fallback.",
194
+ ),
195
Flag.optional,
196
),
197
stage: Flag.string("stage").pipe(