Skip to content

Commit

Permalink
docker auth: improve missing user/pwd
Browse files Browse the repository at this point in the history
Specify the "missing username and password" error message. This makes debugging the action easier when for example mistyping the username or the password.

Signed-off-by: Frank Villaro-Dixon <frank@vi-di.fr>
  • Loading branch information
Frankkkkk committed Apr 30, 2024
1 parent 5f4866a commit c87ae89
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions src/docker.ts
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,13 @@ export async function loginStandard(registry: string, username: string, 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);
Expand Down

0 comments on commit c87ae89

Please sign in to comment.