浏览代码

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
Kasper Seweryn 1 年之前
父节点
当前提交
b3209bb28b
共有 2 个文件被更改,包括 7 次插入0 次删除
  1. 6 0
      .changes/cli-global-gitignore.md
  2. 1 0
      tooling/cli/src/helpers/app_paths.rs

+ 6 - 0
.changes/cli-global-gitignore.md

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

+ 1 - 0
tooling/cli/src/helpers/app_paths.rs

@@ -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
 }