Skip to content

fix(cli): ag init --force implies --yes, --yes creates config on partial state (#3345, #3354)#3391

Merged
OneStepAt4time merged 1 commit into
developfrom
fix/3345-3354-init-flags
May 14, 2026
Merged

fix(cli): ag init --force implies --yes, --yes creates config on partial state (#3345, #3354)#3391
OneStepAt4time merged 1 commit into
developfrom
fix/3345-3354-init-flags

Conversation

@OneStepAt4time

Copy link
Copy Markdown
Owner

Summary

Fixes #3345 and #3354 — two ag init flag handling bugs.

#3354: --force still prompts interactively

Problem: ag init --force prompted for 4 interactive questions despite docs saying it skips confirmation.
Fix: --force now implies --yes (non-interactive). All prompts are skipped.

#3345: --yes skips config creation on partial state

Problem: With --yes, if .aegis/ exists with keys.json/state.json but no config.yaml, the CLI claims success but never creates config.yaml.
Fix: The --yes skip-write guard now only activates when an existing config is actually present. When there's no config file, --yes creates it.

Verification

  • tsc --noEmit: clean
  • Logic flow verified: --force skips all prompts + writes config; --yes creates config on partial state

…ial state (#3345, #3354)

#3354: --force now implies --yes (non-interactive). Previously, --force
still prompted for 4 interactive questions. The docs say --force skips
the confirmation prompt, which now matches behavior.

#3345: --yes with partial state (no config.yaml but .aegis/ exists with
other files like keys.json) now correctly creates config.yaml instead
of silently skipping and claiming success.

Fixes: #3345, #3354

@aegis-gh-agent aegis-gh-agent Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

✅ Approved.

Review gates checked:

  1. Full diff reviewed — logic is correct
  2. --force implies --yes via if (force) yes = true — clean, addresses #3354
  3. The existingConfig guard inside yes && !force block is the right fix for #3345 — previously it would skip write even when no config file existed
  4. CI all green, no conflicts, targets develop

Both issues (#3345, #3354) are properly addressed. Ready to merge.

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