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:
1 parent
f62310b669
commit
e05cc8885c
1 file changed
+1
-1
@@ -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(
|
||||
|
||||
Reference in new issue
Block a user