Skip to content

Comments

fix(cli): restore --vault, --vault-key, --vault-path flags after clap migration#589

Merged
bug-ops merged 2 commits intomainfrom
fix/restore-vault-cli-flags
Feb 19, 2026
Merged

fix(cli): restore --vault, --vault-key, --vault-path flags after clap migration#589
bug-ops merged 2 commits intomainfrom
fix/restore-vault-cli-flags

Conversation

@bug-ops
Copy link
Owner

@bug-ops bug-ops commented Feb 19, 2026

Summary

  • Vault CLI flags (--vault, --vault-key, --vault-path) were lost during clap migration; clap rejected them as unknown arguments
  • Refactored AppBuilder::from_env()AppBuilder::new() with explicit CLI overrides, eliminating manual std::env::args() parsing
  • Added ZEPH_VAULT_KEY / ZEPH_VAULT_PATH env var support for key and vault paths
  • Removed redundant is_tui_requested() in favor of clap-parsed cli.tui
  • Added 6 regression tests covering flag parsing and priority chain

Test plan

  • cargo +nightly fmt --check
  • cargo clippy --workspace -- -D warnings
  • cargo nextest run --workspace --lib --bins (1878 passed)
  • Manual: cargo run -- --vault age --vault-key /tmp/k --vault-path /tmp/v accepts flags without error

Closes #587

… migration

Vault CLI flags were lost when argument parsing migrated to clap::Parser.
Clap rejected them as unknown arguments before parse_vault_args() could
process them via std::env::args().

- Add vault, vault_key, vault_path fields to Cli struct
- Refactor AppBuilder::from_env() to AppBuilder::new() with explicit overrides
- Refactor parse_vault_args() / resolve_config_path() to accept CLI params
- Add ZEPH_VAULT_KEY / ZEPH_VAULT_PATH env var support
- Remove is_tui_requested() in favor of clap-parsed cli.tui
- Add regression tests for vault flag parsing and priority chain

Closes #587
@github-actions github-actions bot added bug Something isn't working rust core size/M and removed bug Something isn't working labels Feb 19, 2026
@github-actions github-actions bot added documentation Improvements or additions to documentation bug Something isn't working size/L and removed size/M labels Feb 19, 2026
@bug-ops bug-ops enabled auto-merge (squash) February 19, 2026 11:38
@bug-ops bug-ops merged commit 1b26acf into main Feb 19, 2026
22 checks passed
@bug-ops bug-ops deleted the fix/restore-vault-cli-flags branch February 19, 2026 11:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working core documentation Improvements or additions to documentation rust size/L

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Restore --vault, --vault-key, --vault-path CLI flags after clap migration

1 participant