system/output: pass through LinkError
	
		
			
	
		
	
	
		
	
		
			All checks were successful
		
		
	
	
		
			
				
	
				Test / Create distribution (push) Successful in 35s
				
			
		
			
				
	
				Test / Sandbox (push) Successful in 2m50s
				
			
		
			
				
	
				Test / Sandbox (race detector) (push) Successful in 4m54s
				
			
		
			
				
	
				Test / Hpkg (push) Successful in 5m16s
				
			
		
			
				
	
				Test / Hakurei (race detector) (push) Successful in 5m51s
				
			
		
			
				
	
				Test / Hakurei (push) Successful in 2m57s
				
			
		
			
				
	
				Test / Flake checks (push) Successful in 2m10s
				
			
		
		
	
	
				
					
				
			
		
			All checks were successful
		
		
	
	Test / Create distribution (push) Successful in 35s
				
			Test / Sandbox (push) Successful in 2m50s
				
			Test / Sandbox (race detector) (push) Successful in 4m54s
				
			Test / Hpkg (push) Successful in 5m16s
				
			Test / Hakurei (race detector) (push) Successful in 5m51s
				
			Test / Hakurei (push) Successful in 2m57s
				
			Test / Flake checks (push) Successful in 2m10s
				
			This has similar formatting to PathError. Signed-off-by: Ophestra <cat@gensokyo.uk>
This commit is contained in:
		
							parent
							
								
									e68db7fbfc
								
							
						
					
					
						commit
						fcd0f2ede7
					
				| @ -34,6 +34,7 @@ func (e *OpError) Error() string { | ||||
| 
 | ||||
| 	switch { | ||||
| 	case errors.As(e.Err, new(*os.PathError)), | ||||
| 		errors.As(e.Err, new(*os.LinkError)), | ||||
| 		errors.As(e.Err, new(*net.OpError)), | ||||
| 		errors.As(e.Err, new(*container.StartError)): | ||||
| 		return e.Err.Error() | ||||
|  | ||||
| @ -137,22 +137,14 @@ func TestPrintJoinedError(t *testing.T) { | ||||
| 			{"file descriptor in bad state"}, | ||||
| 		}}, | ||||
| 		{"many message", errors.Join( | ||||
| 			&container.StartError{ | ||||
| 				Step: "meow", | ||||
| 				Err:  syscall.ENOMEM, | ||||
| 			}, | ||||
| 			&os.PathError{ | ||||
| 				Op:   "meow", | ||||
| 				Path: "/proc/nonexistent", | ||||
| 				Err:  syscall.ENOSYS, | ||||
| 			}, | ||||
| 			&OpError{ | ||||
| 				Op:     "meow", | ||||
| 				Err:    syscall.ENODEV, | ||||
| 				Revert: true, | ||||
| 			}), [][]any{ | ||||
| 			&container.StartError{Step: "meow", Err: syscall.ENOMEM}, | ||||
| 			&os.PathError{Op: "meow", Path: "/proc/nonexistent", Err: syscall.ENOSYS}, | ||||
| 			&os.LinkError{Op: "link", Old: "/etc", New: "/proc/nonexistent", Err: syscall.ENOENT}, | ||||
| 			&OpError{Op: "meow", Err: syscall.ENODEV, Revert: true}, | ||||
| 		), [][]any{ | ||||
| 			{"cannot meow: cannot allocate memory"}, | ||||
| 			{"meow /proc/nonexistent: function not implemented"}, | ||||
| 			{"link /etc /proc/nonexistent: no such file or directory"}, | ||||
| 			{"cannot revert meow: no such device"}, | ||||
| 		}}, | ||||
| 	} | ||||
|  | ||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user