Skip to content

resolveBoolean

resolveBoolean(flagValue, envVar, fallback): boolean

Defined in: packages/simply-cicd-core/src/flags/env.ts:90

Resolve a boolean setting with CLI flag > environment variable > fallback precedence.

The flag is checked for undefined rather than falsiness, so an explicit --no-… stays distinguishable from an unset flag and still beats the environment.

boolean | undefined

The parsed CLI flag, if the caller passed one.

string | undefined

The environment value, coerced via parseBooleanString.

boolean

Used when neither the flag nor the environment variable is set.

boolean

The resolved boolean.