Skip to content

Commit

Permalink
make curl fail on error
Browse files Browse the repository at this point in the history
  • Loading branch information
vitaly4n committed Sep 16, 2024
1 parent 9cfc146 commit e287641
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions _impl/_functions.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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"

Expand All @@ -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 $?
Expand Down

0 comments on commit e287641

Please sign in to comment.