Skip to content

Commit ed70804

Browse files
renkoh72636c
andauthored
Apply suggestions from code review
Co-authored-by: Ryan Ling <[email protected]>
1 parent aa2614b commit ed70804

File tree

1 file changed

+6
-3
lines changed

1 file changed

+6
-3
lines changed

hooks/lib/ecr-registry-provider.bash

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,15 @@
11
login() {
2-
local account_id=$(aws sts get-caller-identity --query Account --output text)
3-
local region=$(get_ecr_region)
2+
local account_id
3+
local region
4+
5+
account_id=$(aws sts get-caller-identity --query Account --output text)
6+
region=$(get_ecr_region)
47

58
aws ecr get-login-password \
69
--region "${region}" \
710
| docker login \
811
--username AWS \
9-
--password-stdin "${account_id}".dkr.ecr."${region}".amazonaws.com
12+
--password-stdin "${account_id}.dkr.ecr.${region}.amazonaws.com"
1013
}
1114

1215
get_ecr_region() {

0 commit comments

Comments
 (0)