Skip to content

Commit

Permalink
balena-deploy: fail if device type not found
Browse files Browse the repository at this point in the history
Change-type: patch
Signed-off-by: Ryan Cooke <[email protected]>
  • Loading branch information
rcooke-warwick committed Sep 27, 2023
1 parent ae7c2e1 commit 14896d0
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions automation/include/balena-deploy.inc
Original file line number Diff line number Diff line change
Expand Up @@ -199,6 +199,10 @@ balena_deploy_to_s3() {
_is_private=$(balena_api_is_dt_private "${_device_type}")
if [ "${_is_private}" = "false" ]; then
_s3_policy="public-read"
elif [ -z "${_is_private}" ] || [ "${_is_private}" = "null" ]; then
# If _is_private is empty, or a null value, the curl to retrieve it has failed
echo "[ERROR] Device type not found..."
return 1
fi

local _s3_cmd="s4cmd --access-key=${_s3_access_key} --secret-key=${_s3_secret_key}"
Expand Down

0 comments on commit 14896d0

Please sign in to comment.