Skip to content

Commit

Permalink
Merge pull request #49 from buildkite/keithduncan/shellcheck
Browse files Browse the repository at this point in the history
Quote the IDMS address
  • Loading branch information
keithduncan authored Aug 31, 2021
2 parents e844384 + 3f01b47 commit 5154931
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions git-credential-s3-secrets
Original file line number Diff line number Diff line change
Expand Up @@ -60,10 +60,10 @@ s3_bucket_region() {
then
# This plug-in may not be executing in an AWS VPC or have access to the IDMS
# Fail fast with the --connect-timeout flag
local token=$(curl -X PUT -H "X-aws-ec2-metadata-token-ttl-seconds: 60" --fail --silent --show-error --location --connect-timeout 5 http://169.254.169.254/latest/api/token)
local token=$(curl -X PUT -H "X-aws-ec2-metadata-token-ttl-seconds: 60" --fail --silent --show-error --location --connect-timeout 5 "http://169.254.169.254/latest/api/token")
if [ -n "${token}" ]
then
guess_region=$(curl -H "X-aws-ec2-metadata-token: $token" --fail --silent --show-error --location http://169.254.169.254/latest/meta-data/placement/region)
guess_region=$(curl -H "X-aws-ec2-metadata-token: $token" --fail --silent --show-error --location "http://169.254.169.254/latest/meta-data/placement/region")
fi
fi
if [ -z "${guess_region}" ]
Expand Down

0 comments on commit 5154931

Please sign in to comment.