Skip to content

Commit 6643943

Browse files
authored
setup.sh: populate empty gitlink placeholder dirs (fix CI) (#78)
Several siblings are tracked as gitlinks without a .gitmodules, so a fresh checkout (actions/checkout submodules:false) leaves them as empty placeholder directories. The previous `[ ! -d ]` guard saw the dir and skipped cloning, leaving empty uv workspace members -> 'mj-viser is not a workspace member' and `uv sync` failing while building geodude. Detect a populated repo via its .git entry and clone into the empty placeholder instead. Fixes #74.
1 parent f8845fc commit 6643943

1 file changed

Lines changed: 9 additions & 3 deletions

File tree

setup.sh

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -36,11 +36,17 @@ cd "$(dirname "$0")"
3636
echo "==> Cloning repos..."
3737
for url in "${REPOS[@]}"; do
3838
dir=$(basename "$url")
39-
if [ ! -d "$dir" ]; then
39+
# Several siblings are tracked as gitlinks (submodule-style pointers) but
40+
# there is no .gitmodules, so a fresh checkout leaves them as EMPTY
41+
# placeholder directories. A plain `[ ! -d ]` guard would see the dir and
42+
# skip it, leaving an empty (broken) uv workspace member. Detect a populated
43+
# repo by its .git entry instead, and clone into the empty placeholder.
44+
if [ -e "$dir/.git" ]; then
45+
echo " $dir already present, skipping"
46+
else
4047
echo " cloning $dir"
48+
rm -rf "$dir" # drop the empty gitlink placeholder, if any
4149
git clone "$url"
42-
else
43-
echo " $dir already present, skipping"
4450
fi
4551
done
4652

0 commit comments

Comments
 (0)