Skip to content

Commit 08c8ebc

Browse files
authored
Merge pull request #601 from aws/fix
fix: remove unnecessary param
2 parents 0172382 + c1357e2 commit 08c8ebc

File tree

2 files changed

+4
-6
lines changed

2 files changed

+4
-6
lines changed

src/lib/ecrUtils.ts

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -27,9 +27,8 @@ export async function loginToRegistry(
2727
tl.setSecret(tokens[1]) // password
2828
}
2929

30-
await dockerHandler.runDockerCommand(dockerPath, 'login', ['-u', tokens[0], '--password-stdin', endpoint], {
31-
silent: true,
32-
input: tokens[1] // Password provided via stdin
30+
await dockerHandler.runDockerCommand(dockerPath, 'login', ['-u', tokens[0], '-p', tokens[1], endpoint], {
31+
silent: true
3332
})
3433
}
3534

tests/taskTests/ecrPullImage/ecrPullImage-test.ts

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -96,7 +96,7 @@ describe('ECR Pull image', () => {
9696
})
9797

9898
test('Happy path', async () => {
99-
expect.assertions(3)
99+
expect.assertions(2)
100100
const dockerHandler = { ...defaultDocker }
101101
const runDockerCommand = jest.fn((thing1, thing2, thing3) => Promise.resolve())
102102
dockerHandler.runDockerCommand = runDockerCommand
@@ -108,7 +108,6 @@ describe('ECR Pull image', () => {
108108
const taskOperations = new TaskOperations(ecr, dockerHandler, taskParameters)
109109
await taskOperations.execute()
110110
expect(ecr.getAuthorizationToken).toBeCalledTimes(1)
111-
expect(runDockerCommand.mock.calls[0][2][2]).toStrictEqual('--password-stdin')
112-
expect(runDockerCommand.mock.calls[0][2][3]).toStrictEqual('https://example.com')
111+
expect(runDockerCommand.mock.calls[0][2][4]).toStrictEqual('https://example.com')
113112
})
114113
})

0 commit comments

Comments
 (0)