mirror of
				https://github.com/docker/build-push-action.git
				synced 2025-11-04 00:10:55 +00:00 
			
		
		
		
	ignore error when nothing is mounted
This commit is contained in:
		
					parent
					
						
							
								23eae444a4
							
						
					
				
			
			
				commit
				
					
						53000f0f59
					
				
			
		
					 3 changed files with 7 additions and 4 deletions
				
			
		
							
								
								
									
										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
											
										
									
								
							| 
						 | 
					@ -397,8 +397,11 @@ actionsToolkit.run(
 | 
				
			||||||
          core.info('Unmounted device');
 | 
					          core.info('Unmounted device');
 | 
				
			||||||
        }
 | 
					        }
 | 
				
			||||||
      } catch (error) {
 | 
					      } catch (error) {
 | 
				
			||||||
        // Only log warning if error is not from grep finding no mounts
 | 
					        // grep returns exit code 1 when no matches are found.
 | 
				
			||||||
        if (!error.message.includes('exit code 1')) {
 | 
					        if (error.code === 1) {
 | 
				
			||||||
 | 
					          core.debug('No dangling mounts found to clean up');
 | 
				
			||||||
 | 
					        } else {
 | 
				
			||||||
 | 
					          // Only warn for actual errors, not for the expected case where grep finds nothing.
 | 
				
			||||||
          core.warning(`Error during cleanup: ${error.message}`);
 | 
					          core.warning(`Error during cleanup: ${error.message}`);
 | 
				
			||||||
        }
 | 
					        }
 | 
				
			||||||
      }
 | 
					      }
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue