Skip to content

Commit 7272bdb

Browse files
committed
fix: split script exit code
1 parent 9607c4b commit 7272bdb

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

tools/split.sh

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -49,10 +49,10 @@ split_package() {
4949
local label="$package -> $ORG/$repo"
5050

5151
local sha
52-
sha=$(splitsh-lite --prefix="src/$package")
52+
sha=$(splitsh-lite --prefix="src/$package" | tail -1)
5353

54-
if [[ -z "$sha" ]]; then
55-
echo "[error] $label - splitsh-lite failed"
54+
if [[ ! "$sha" =~ ^[0-9a-f]{40}$ ]]; then
55+
echo "[error] $label - splitsh-lite returned invalid SHA: $sha"
5656
return 1
5757
fi
5858

0 commit comments

Comments
 (0)