We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 214f09b commit 0c4bfdeCopy full SHA for 0c4bfde
git-credential-s3-secrets
@@ -71,7 +71,9 @@ s3_bucket_region() {
71
guess_region="us-east-1"
72
fi
73
74
- local bucket_region="$(aws s3api get-bucket-location --bucket "${bucket}" --region "${guess_region}" --output text)"
+ # Buckets in us-east-1 have a LocationConstraint of null
75
+ # https://docs.aws.amazon.com/cli/latest/reference/s3api/get-bucket-location.html
76
+ local bucket_region="$(aws s3api get-bucket-location --bucket "${bucket}" --region "${guess_region}" --output text --query "LocationConstraint || 'us-east-1'")"
77
78
echo "${bucket_region}"
79
}
0 commit comments