Skip to content

fix(config): honor false boolean env overrides - #1

Open
huklaa wants to merge 1 commit into
gitopia:mainfrom
huklaa:fix-config-false-env-overrides
Open

huklaa wants to merge 1 commit into
gitopia:mainfrom
huklaa:fix-config-false-env-overrides

Conversation

@huklaa

@huklaa huklaa commented Sep 13, 2026

Copy link
Copy Markdown

Summary

  • Make "DRY_RUN" and "APPROVAL_MODE" override file configuration whenever the environment variable is present.
  • Preserve file/default values when these environment variables are absent.
  • Add regression coverage for overriding file-provided "true" values with environment-provided "false".

Problem

The existing "os.Getenv" checks only assign these fields when the environment value is "true" or "1". As a result, an explicitly configured "false" is treated like an absent variable and cannot override a "true" value loaded from the JSON configuration file.

This change uses "os.LookupEnv", so variable presence determines precedence while its parsed value determines the resulting boolean.

Validation

  • "go test ./..."
  • "go test -race ./internal/config"
  • "go vet ./..."
  • "git diff --check"

A final duplicate/WIP check found no related issue, pull request, branch, or recent commit.

@huklaa
huklaa force-pushed the fix-config-false-env-overrides branch from a2b4177 to 2f2f141 Compare September 14, 2026 20:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant