Skip to content

Commit 30a8ff0

Browse files
fix: remove accidentally committed debug script and document resolveBooleanFlag semantics
- Delete apps/server/scripts/logger-scope-repro.ts (debug reproduction script) - Add JSDoc to resolveBooleanFlag explaining why Some(false) is treated as absent Co-authored-by: Julius Marminge <[email protected]>
1 parent 383caea commit 30a8ff0

File tree

2 files changed

+7
-66
lines changed

2 files changed

+7
-66
lines changed

apps/server/scripts/logger-scope-repro.ts

Lines changed: 0 additions & 66 deletions
This file was deleted.

apps/server/src/main.ts

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -119,6 +119,13 @@ const CliEnvConfig = Config.all({
119119
),
120120
});
121121

122+
/**
123+
* Resolve a CLI boolean flag against an environment/mode default.
124+
*
125+
* Effect CLI boolean flags parse to `Some(false)` when absent (even with
126+
* `Flag.optional`), so we treat `Some(false)` the same as `None` — only an
127+
* explicit `--flag` (i.e. `Some(true)`) overrides the environment value.
128+
*/
122129
const resolveBooleanFlag = (flag: Option.Option<boolean>, envValue: boolean) =>
123130
Option.getOrElse(Option.filter(flag, Boolean), () => envValue);
124131

0 commit comments

Comments
 (0)