mirror of
				https://github.com/go-gitea/gitea
				synced 2025-10-27 01:18:27 +00:00 
			
		
		
		
	User facing messages for AGit errors (#33012)
Adds user facing messages to errors when submitting agit pull request Tries to highlight the returned error more and fixes agit suggestion to create PR on first submission. Closes: https://github.com/go-gitea/gitea/issues/32965 --------- Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
This commit is contained in:
		| @@ -104,7 +104,10 @@ func fail(ctx context.Context, userMessage, logMsgFmt string, args ...any) error | ||||
| 	// There appears to be a chance to cause a zombie process and failure to read the Exit status | ||||
| 	// if nothing is outputted on stdout. | ||||
| 	_, _ = fmt.Fprintln(os.Stdout, "") | ||||
| 	_, _ = fmt.Fprintln(os.Stderr, "Gitea:", userMessage) | ||||
| 	// add extra empty lines to separate our message from other git errors to get more attention | ||||
| 	_, _ = fmt.Fprintln(os.Stderr, "error:") | ||||
| 	_, _ = fmt.Fprintln(os.Stderr, "error:", userMessage) | ||||
| 	_, _ = fmt.Fprintln(os.Stderr, "error:") | ||||
|  | ||||
| 	if logMsgFmt != "" { | ||||
| 		logMsg := fmt.Sprintf(logMsgFmt, args...) | ||||
|   | ||||
		Reference in New Issue
	
	Block a user