Skip to content

Commit 524a9e7

Browse files
committed
Check for valid artifact_url in distribute-latest-toolchain.sh
1 parent 7f2d9d0 commit 524a9e7

File tree

1 file changed

+8
-1
lines changed

1 file changed

+8
-1
lines changed

utils/webassembly/distribute-latest-toolchain.sh

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,14 @@ get_artifact_url() {
3030

3131
download_artifact() {
3232
local name=$1
33-
github -L "$(get_artifact_url $name)" --fail -o "$name.zip"
33+
local artifact_url="$(get_artifact_url $name)"
34+
35+
if [ -z "$artifact_url" ] || [ "$artifact_url" == "null" ]; then
36+
echo "No successfully built artifacts available for $name"
37+
exit 0
38+
fi
39+
40+
github -L "$artifact_url" --fail -o "$name.zip"
3441
}
3542

3643
is_released() {

0 commit comments

Comments
 (0)