Skip to content

Commit c6031c7

Browse files
authored
feat(cli): increase lookup depth, add env var option (#3451)
1 parent 7e04c07 commit c6031c7

File tree

2 files changed

+14
-1
lines changed

2 files changed

+14
-1
lines changed
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
---
2+
"cli.rs": patch
3+
"cli.js": patch
4+
---
5+
6+
Increase `tauri.conf.json` directory lookup depth to `3` and allow changing it with the `TAURI_PATH_DEPTH` environment variable.

tooling/cli/src/helpers/app_paths.rs

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,14 @@ fn lookup<F: Fn(&PathBuf) -> bool>(dir: &Path, checker: F) -> Option<PathBuf> {
2525

2626
let mut builder = WalkBuilder::new(dir);
2727
let _ = builder.add_ignore(default_gitignore);
28-
builder.require_git(false).ignore(false).max_depth(Some(2));
28+
builder.require_git(false).ignore(false).max_depth(Some(
29+
std::env::var("TAURI_PATH_DEPTH")
30+
.map(|d| {
31+
d.parse()
32+
.expect("`TAURI_PATH_DEPTH` environment variable must be a positive integer")
33+
})
34+
.unwrap_or(3),
35+
));
2936

3037
for entry in builder.build().flatten() {
3138
let path = dir.join(entry.path());

0 commit comments

Comments
 (0)