Skip to main content

get_config_path

Function get_config_path 

Source
pub fn get_config_path() -> PathBuf
Expand description

Get the path to the configuration file.

Resolution order:

  1. $GW_CONFIG_HOME/config.json — test / CI override; never set in production.
  2. $HOME/.config/git-worktree-manager/config.json — standard path.

The $GW_CONFIG_HOME escape hatch exists because dirs::home_dir() on Windows uses a Windows API call that ignores the HOME / USERPROFILE env vars, so integration tests cannot redirect config I/O through a tempdir without an explicit override.