Function resolve_config_path

Source
pub fn resolve_config_path(
    cli_arg: Option<String>,
    env_var: Option<String>,
) -> String
Expand description

Returns the config path from CLI arguments or the default path.

Internal helper function that parses CLI arguments using UserInput and returns either the provided --config-ini path or the default configuration file location.

§Returns

  • CLI path if --config-ini was provided
  • Default path (~/.config/rusty-commit-saver/rusty-commit-saver.ini) otherwise

§Called By

This function is called internally by retrieve_config_file_path().

§See Also