fix tests

This commit is contained in:
Cole Miller 2025-07-31 12:46:33 -04:00
parent ca458cc529
commit a9a23251b7
6 changed files with 21 additions and 14 deletions

View file

@ -507,3 +507,16 @@ fn add_vscode_user_data_paths(paths: &mut Vec<PathBuf>, product_name: &str) {
);
}
}
#[cfg(any(test, feature = "test-support"))]
pub fn global_gitignore_path() -> Option<PathBuf> {
Some(Path::new(util::path!("/home/zed/.config/git/ignore")).into())
}
#[cfg(not(any(test, feature = "test-support")))]
pub fn global_gitignore_path() -> Option<PathBuf> {
static GLOBAL_GITIGNORE_PATH: OnceLock<Option<PathBuf>> = OnceLock::new();
GLOBAL_GITIGNORE_PATH
.get_or_init(|| ::ignore::gitignore::gitconfig_excludes_path())
.clone()
}