This commit is contained in:
Frank Villaro-Dixon 2024-05-08 14:44:39 -05:00 committed by GitHub
commit 4c4b6e86c3
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);