Skip to content

Commit

Permalink
fix: podman login into external registries (#1120)
Browse files Browse the repository at this point in the history
Signed-off-by: Anatolii Bazko <abazko@redhat.com>
  • Loading branch information
tolusha authored May 31, 2024
1 parent c89f94e commit 0ab0c0c
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ describe('podman Config API Service', () => {
'sh',
'-c',
expect.stringContaining(
'podman login registry1 -u user1 -p password1 || true\npodman login registry2 -u user2 -p password2 || true',
"podman login registry1 -u 'user1' -p 'password1' || true\npodman login registry2 -u 'user2' -p 'password2' || true",
),
]),
expect.anything(),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -176,7 +176,7 @@ export class PodmanApiService implements IPodmanApi {

if (username && password) {
// `|| true` ensures that `podman login` won't fail if credentials are invalid
externalDockerRegistriesPodmanLoginCommand += `podman login ${registry} -u ${username} -p ${password} || true\n`;
externalDockerRegistriesPodmanLoginCommand += `podman login ${registry} -u '${username}' -p '${password}' || true\n`;
}
}
}
Expand Down

0 comments on commit 0ab0c0c

Please sign in to comment.