mirror of
				https://gitea.com/docker/login-action.git
				synced 2025-10-31 17:18:20 +07:00 
			
		
		
		
	Merge pull request #706 from Frankkkkk/patch-1
docker auth: improve missing user/pwd
This commit is contained in:
		
						commit
						db77945884
					
				
							
								
								
									
										2
									
								
								dist/index.js
									
									
									
										generated
									
									
										vendored
									
									
								
							
							
						
						
									
										2
									
								
								dist/index.js
									
									
									
										generated
									
									
										vendored
									
									
								
							
										
											
												File diff suppressed because one or more lines are too long
											
										
									
								
							
							
								
								
									
										2
									
								
								dist/index.js.map
									
									
									
										generated
									
									
										vendored
									
									
								
							
							
						
						
									
										2
									
								
								dist/index.js.map
									
									
									
										generated
									
									
										vendored
									
									
								
							
										
											
												File diff suppressed because one or more lines are too long
											
										
									
								
							| @ -21,9 +21,15 @@ export async function logout(registry: string): Promise<void> { | |||||||
| } | } | ||||||
| 
 | 
 | ||||||
| export async function loginStandard(registry: string, username: string, password: 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'); |     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']; |   const loginArgs: Array<string> = ['login', '--password-stdin']; | ||||||
|   loginArgs.push('--username', username); |   loginArgs.push('--username', username); | ||||||
|  | |||||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user