fix: remove lossy Boolean filter from resolveBooleanFlag

Option.filter(flag, Boolean) collapses Some(false) into None, making it
impossible to explicitly override an env-set true to false via CLI flags.
Since Flag.optional already returns None for absent flags, the filter is
unnecessary and incorrect — Option.getOrElse alone correctly falls back
to the env value only when the flag is truly absent.

Co-authored-by: Julius Marminge <[email protected]>
This commit is contained in:
Cursor AgentandJulius Marminge committed 2026-03-06 07:19:40 +00:00
1 parent f62310b669
commit e05cc8885c
1 file changed
+1 -1
+1 -1
View File
@@ -120,7 +120,7 @@ const CliEnvConfig = Config.all({
});
const resolveBooleanFlag = (flag: Option.Option<boolean>, envValue: boolean) =>
Option.getOrElse(Option.filter(flag, Boolean), () => envValue);
Option.getOrElse(flag, () => envValue);
const ServerConfigLive = (input: CliInput) =>
Layer.effect(