fix(cli): disable global gitignore during tauri.conf.* lookup (#8688)

* fix: disable global gitignore

There are cases when people use git to manage their dotfiles in the home directory. When a tauri projects uses other name than `src-tauri` for the rust source code, the lookup may fail if there's a global gitignore.

* change file
This commit is contained in:
Kasper Seweryn
2024-01-29 15:39:05 +00:00
committed by GitHub
parent 2631e97e2b
commit b3209bb28b
2 changed files with 7 additions and 0 deletions

View File

@@ -0,0 +1,6 @@
---
"tauri-cli": patch:enhance
"@tauri-apps/cli": patch:enhance
---
Ignore global `.gitignore` when searching for tauri directory.

View File

@@ -31,6 +31,7 @@ pub fn walk_builder(path: &Path) -> WalkBuilder {
let mut builder = WalkBuilder::new(path);
builder.add_custom_ignore_filename(".taurignore");
builder.git_global(false);
let _ = builder.add_ignore(default_gitignore);
builder
}