This commit is contained in:
Frank Villaro-Dixon 2024-05-15 12:58:26 +02:00 committed by GitHub
commit fbb09fc0bb
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -21,9 +21,16 @@ 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);