diff --git a/src/docker.ts b/src/docker.ts index fd3194a9..08b0a434 100644 --- a/src/docker.ts +++ b/src/docker.ts @@ -21,9 +21,16 @@ export async function logout(registry: string): Promise { } export async function loginStandard(registry: string, username: string, password: string): Promise { - if (!username || !password) { + if (!username && !password) { throw new Error('Username and password required'); } + if (!username) { + throw new Error('Username required'); + } + if (!password) { + throw new Error('Password required'); + } + const loginArgs: Array = ['login', '--password-stdin']; loginArgs.push('--username', username);