From e28764160cd56d15d94a70678cdc53212765c442 Mon Sep 17 00:00:00 2001 From: vitaly4n Date: Mon, 16 Sep 2024 16:05:21 +0300 Subject: [PATCH] make curl fail on error --- _impl/_functions.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/_impl/_functions.sh b/_impl/_functions.sh index 4f1e0d6..baf45a7 100755 --- a/_impl/_functions.sh +++ b/_impl/_functions.sh @@ -229,7 +229,7 @@ function yc_s3_upload { local -r token=${VAR_TOKEN:-$(yc_get_token)} local -r auth_h="X-YaCloud-SubjectToken: $token" - curl -L -H "$auth_h" --upload-file - "$VAR_OBJECT_STORAGE_URL/$bucket/$bucket_path" \ + curl --fail -L -H "$auth_h" --upload-file - "$VAR_OBJECT_STORAGE_URL/$bucket/$bucket_path" \ 2>/dev/null \ <"$file" @@ -247,7 +247,7 @@ function yc_s3_delete { local -r token=${VAR_TOKEN:-$(yc_get_token)} local -r auth_h="X-YaCloud-SubjectToken: $token" - curl -L -H "$auth_h" -X DELETE "$VAR_OBJECT_STORAGE_URL/$bucket/$bucket_path" \ + curl --fail -L -H "$auth_h" -X DELETE "$VAR_OBJECT_STORAGE_URL/$bucket/$bucket_path" \ 2>/dev/null return $?