-
Notifications
You must be signed in to change notification settings - Fork 1
Closed
Description
Problem
When CLI argument parsing was migrated from manual std::env::args() to clap::Parser, the vault-related flags (--vault, --vault-key, --vault-path) were not added to the Cli struct. Clap rejects unknown arguments, so these flags cause an error before parse_vault_args() in bootstrap.rs can process them.
Additionally, --config and --tui were being parsed both by clap and manually via std::env::args(), creating redundant parsing.
Fix
- Added
--vault,--vault-key,--vault-pathfields toClistruct - Refactored
AppBuilder::from_env()->AppBuilder::new()to accept explicit CLI overrides - Refactored
parse_vault_args()to accept CLI overrides instead of parsingstd::env::args()manually - Added
ZEPH_VAULT_KEYandZEPH_VAULT_PATHenv var support for key/path - Refactored
resolve_config_path()to accept CLI override - Removed
is_tui_requested()in favor of clap-parsedcli.tui - Added regression tests for CLI vault flag parsing and priority chain
Priority chain (preserved)
--vault CLI flag > ZEPH_VAULT_BACKEND env > config.vault.backend > "env" default
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels