Merge pull request #96 from Dasharo/curl-fail

Return error code if download fails e.g. with 404 code
This commit is contained in:
Michał Iwanicki
2025-08-06 15:13:40 +02:00
committed by GitHub
+2 -1
View File
@@ -234,7 +234,8 @@ board_config() {
echo "Downloading board configs repository"
mkdir -p "$BOARD_CONFIG_PATH"
curl -L -o "$BOARD_CONFIG_PATH.tar.gz" https://github.com/Dasharo/dts-configs/archive/${DTS_CONFIG_REF}.tar.gz >/dev/null 2>>"$ERR_LOG_FILE"
curl -f -L -o "$BOARD_CONFIG_PATH.tar.gz" \
https://github.com/Dasharo/dts-configs/archive/${DTS_CONFIG_REF}.tar.gz >/dev/null 2>>"$ERR_LOG_FILE"
if [ $? -ne 0 ]; then
print_error "Failed to download configs."
return 1