pub fn default_path() -> Result<PathBuf, AuthError>Expand description
The store location: PATH_VAR if set, else the platform’s config dir.
The platform path comes from directories::ProjectDirs with the same triple
Cache::default_root uses, so drep’s two user-level directories are siblings
under one application identity rather than two unrelated paths.
The override exists because there is otherwise no way to run drep against a
scratch store. directories follows each platform’s own convention rather
than the XDG variables, so on macOS XDG_CONFIG_HOME is ignored entirely and
a command run to try something out writes into the real store - which is how
a test key ended up in one. It also serves the ordinary case of keeping
credentials somewhere deliberate, such as a mounted volume.