mirror of
				https://github.com/docker/setup-qemu-action.git
				synced 2025-11-01 01:40:10 +08:00 
			
		
		
		
	fix error message output when pulling image fails
Signed-off-by: CrazyMax <1951866+crazy-max@users.noreply.github.com>
This commit is contained in:
		
							parent
							
								
									13c418a7a8
								
							
						
					
					
						commit
						aa212840b3
					
				| @ -20,7 +20,11 @@ actionsToolkit.run( | |||||||
|     }); |     }); | ||||||
| 
 | 
 | ||||||
|     await core.group(`Pulling binfmt Docker image`, async () => { |     await core.group(`Pulling binfmt Docker image`, async () => { | ||||||
|       await Exec.exec('docker', ['pull', input.image]); |       await Exec.getExecOutput('docker', ['pull', input.image]).then(res => { | ||||||
|  |         if (res.stderr.length > 0 && res.exitCode != 0) { | ||||||
|  |           throw new Error(`cannot pull binfmt image: ${res.stderr.match(/(.*)\s*$/)?.[0]?.trim() ?? 'unknown error'}`); | ||||||
|  |         } | ||||||
|  |       }); | ||||||
|     }); |     }); | ||||||
| 
 | 
 | ||||||
|     await core.group(`Image info`, async () => { |     await core.group(`Image info`, async () => { | ||||||
|  | |||||||
		Loading…
	
		Reference in New Issue
	
	Block a user
	 CrazyMax
						CrazyMax