Skip to content

Commit 7b79d7e

Browse files
authored
Merge pull request #41 from crazy-max/fix-public-ecr
Fix public ECR login with AWS CLI v1
2 parents 3b14bab + f53ca52 commit 7b79d7e

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

dist/index.js

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/aws.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ export const parseCLIVersion = async (stdout: string): Promise<string> => {
4747

4848
export const getDockerLoginCmd = async (cliVersion: string, registry: string, region: string): Promise<string> => {
4949
let ecrCmd = (await isPubECR(registry)) ? 'ecr-public' : 'ecr';
50-
if (semver.satisfies(cliVersion, '>=2.0.0')) {
50+
if (semver.satisfies(cliVersion, '>=2.0.0') || (await isPubECR(registry))) {
5151
return execCLI([ecrCmd, 'get-login-password', '--region', region]).then(pwd => {
5252
return `docker login --username AWS --password ${pwd} ${registry}`;
5353
});

0 commit comments

Comments
 (0)