Public Access
1
0
mirror of https://github.com/docker/login-action.git synced 2026-04-19 07:01:00 +03:00

Merge pull request #706 from Frankkkkk/patch-1

docker auth: improve missing user/pwd
This commit is contained in:
CrazyMax
2024-05-27 13:16:18 +02:00
committed by GitHub
3 changed files with 9 additions and 3 deletions
Generated Vendored
+1 -1
View File
File diff suppressed because one or more lines are too long
Generated Vendored
+1 -1
View File
File diff suppressed because one or more lines are too long
+7 -1
View File
@@ -21,9 +21,15 @@ export async function logout(registry: string): Promise<void> {
}
export async function loginStandard(registry: string, username: string, password: string): Promise<void> {
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<string> = ['login', '--password-stdin'];
loginArgs.push('--username', username);