summaryrefslogtreecommitdiff
path: root/tools
diff options
context:
space:
mode:
authorHiFiPHile <[email protected]>2026-09-02 15:34:10 +0200
committerHiFiPHile <[email protected]>2026-09-02 15:34:10 +0200
commitd705b828e2da1eeaceddf6f504cb12778b68a63f (patch)
tree638fde9ce89cc1c8bee57fe34c5c8895e2635a74 /tools
parent4ef2dcfb4695ec9b3241c0cf48f0d1ab736907c7 (diff)
fix issue on existing dependency directory without .gitdocs/worktree-reuse-workflow
Signed-off-by: HiFiPHile <[email protected]>
Diffstat (limited to 'tools')
-rwxr-xr-xtools/get_deps.py7
1 files changed, 4 insertions, 3 deletions
diff --git a/tools/get_deps.py b/tools/get_deps.py
index 12bec4861..4668dac3b 100755
--- a/tools/get_deps.py
+++ b/tools/get_deps.py
@@ -342,9 +342,10 @@ def get_a_dep(d):
p = Path(TOP / d)
git_cmd = f"git -C {p}"
- # Init git deps if not existed
- if not p.exists():
- p.mkdir(parents=True)
+ # Init git deps if not initialized. Checking only p.exists() lets git -C walk
+ # up to TinyUSB's repository when an empty dependency directory is present.
+ if not (p / '.git').exists():
+ p.mkdir(parents=True, exist_ok=True)
run_cmd(f"{git_cmd} init")
run_cmd(f"{git_cmd} remote add origin {url}")
head = None