Skip to content

Commit

Permalink
Merge pull request #334 from ahamilton55/ah/fix-multiple-repos
Browse files Browse the repository at this point in the history
fix: fix jq command when working with an existing Docker config.json file
  • Loading branch information
brentmmarks authored Mar 6, 2024
2 parents 00f044a + 26dea5f commit 08770f8
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions src/scripts/ecr_login.sh
Original file line number Diff line number Diff line change
Expand Up @@ -38,9 +38,10 @@ configure_config_json(){
if [ ! -s "${CONFIG_FILE}" ]; then
jq_flag="-n"
fi
jq "${jq_flag}" --arg url "${AWS_ECR_VAL_ACCOUNT_URL}" \
--arg helper "ecr-login" '.credHelpers[$url] = $helper' \
"${CONFIG_FILE}" > temp.json && mv temp.json "${CONFIG_FILE}"

jq ${jq_flag} --arg url "${AWS_ECR_VAL_ACCOUNT_URL}" \
--arg helper "ecr-login" '.credHelpers[$url] = $helper' \
"${CONFIG_FILE}" > temp.json && mv temp.json "${CONFIG_FILE}"
}

install_aws_ecr_credential_helper(){
Expand Down

0 comments on commit 08770f8

Please sign in to comment.