feat(cmd/joj3): teapot command wait
This commit is contained in:
		
							parent
							
								
									ccc1510aec
								
							
						
					
					
						commit
						256ce4ac81
					
				|  | @ -57,8 +57,19 @@ func Run(conf *conf.Conf, runID string) error { | ||||||
| 			return err | 			return err | ||||||
| 		} | 		} | ||||||
| 		wg.Wait() | 		wg.Wait() | ||||||
|  | 		if err = cmd.Wait(); err != nil { | ||||||
|  | 			if exitErr, ok := err.(*exec.ExitError); ok { | ||||||
|  | 				exitCode := exitErr.ExitCode() | ||||||
|  | 				slog.Error("cmd completed with non-zero exit code", | ||||||
|  | 					"error", err, | ||||||
|  | 					"exitCode", exitCode) | ||||||
|  | 			} else { | ||||||
|  | 				slog.Error("cmd wait", "error", err) | ||||||
|  | 			} | ||||||
| 			return err | 			return err | ||||||
| 		} | 		} | ||||||
|  | 		return nil | ||||||
|  | 	} | ||||||
| 	skipIssueArg := "--no-skip-result-issue" | 	skipIssueArg := "--no-skip-result-issue" | ||||||
| 	if conf.Teapot.SkipIssue { | 	if conf.Teapot.SkipIssue { | ||||||
| 		skipIssueArg = "--skip-result-issue" | 		skipIssueArg = "--skip-result-issue" | ||||||
|  |  | ||||||
		Loading…
	
		Reference in New Issue
	
	Block a user