Skip to content

fix: config file params ignored when using -f flag - #1

Merged
FaZeTitans merged 1 commit into
mainfrom
fix/config-params
Mar 5, 2026
Merged

FaZeTitans merged 1 commit into
mainfrom
fix/config-params

Conversation

@FaZeTitans

Copy link
Copy Markdown
Owner

Summary

  • Remove default values from yargs for merge, parallel, clear, and deleteMissing options — these defaults were overriding config file values since yargs always populated them, making mergeConfig() think the CLI had explicitly set them
  • Add mergeConfig tests covering file config, CLI override, and defaults-only scenarios

…ed with -f

Yargs defaults for these 4 options prevented config file values from being
used. The nullish coalescing chain in mergeConfig never reached fileConfig
because yargs always provided a concrete value (false/1) instead of undefined.

https://claude.ai/code/session_01AUCATaYV2rG63t1Yu8tjHq
Copilot AI review requested due to automatic review settings March 5, 2026 14:56
@FaZeTitans FaZeTitans self-assigned this Mar 5, 2026

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Fixes an issue where config-file values were being ignored when -f/--config was used, because yargs defaults caused mergeConfig() to treat certain options as explicitly set via CLI.

Changes:

  • Removed yargs default values for merge, parallel, clear, and delete-missing so config-file values can win when the CLI flag isn’t provided.
  • Added mergeConfig() unit tests to cover config-file precedence, CLI overrides, and fallback to defaults.

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated no comments.

File Description
src/cli.ts Stops yargs from pre-populating key options so mergeConfig() can correctly apply config-file values.
src/__tests__/parser.test.ts Adds focused tests validating mergeConfig() precedence order (CLI > file > defaults).

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@FaZeTitans
FaZeTitans merged commit acb23e7 into main Mar 5, 2026
5 checks passed
@FaZeTitans
FaZeTitans deleted the fix/config-params branch March 5, 2026 15:00
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.

3 participants