Skip to content
This repository was archived by the owner on Mar 18, 2025. It is now read-only.

Commit b32025b

Browse files
Fix parsing by sh (yadm-dev#299)
1 parent afab29c commit b32025b

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

yadm

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1323,7 +1323,10 @@ function upgrade() {
13231323
# been cloned first and then added as a submodule.
13241324
"$GIT_PROGRAM" submodule absorbgitdirs
13251325

1326+
local submodule_status
1327+
submodule_status=$("$GIT_PROGRAM" -C "$YADM_WORK" submodule status)
13261328
while read -r sha submodule rest; do
1329+
[ "$submodule" == "" ] && continue
13271330
if [[ "$sha" = -* ]]; then
13281331
continue
13291332
fi
@@ -1334,7 +1337,7 @@ function upgrade() {
13341337
error_out "Unable to upgrade. Could not deinit submodule $submodule"
13351338
}
13361339
submodules+=("$submodule")
1337-
done < <("$GIT_PROGRAM" -C "$YADM_WORK" submodule status)
1340+
done <<< "$submodule_status"
13381341

13391342
assert_parent "$YADM_REPO"
13401343
mv "$LEGACY_REPO" "$YADM_REPO"

0 commit comments

Comments
 (0)