Fixup condition for docker login variable

This commit is contained in:
JustFiesta 2024-05-17 12:36:24 +02:00
parent e5e6889995
commit bbde443f60

View file

@ -25,7 +25,7 @@ fi
echo "Logging in to Amazon ECR..." echo "Logging in to Amazon ECR..."
DOCKER_LOGIN_CMD=$(aws ecr get-login-password --region "$REGION") DOCKER_LOGIN_CMD=$(aws ecr get-login-password --region "$REGION")
if [ $? -eq 0 ]; then if [ -n "$DOCKER_LOGIN_CMD" ]; then
echo "Got credentials from AWS CLI." echo "Got credentials from AWS CLI."
else else
echo "Error: Failed to get credentials from AWS CLI." echo "Error: Failed to get credentials from AWS CLI."