mirror of
				https://github.com/go-gitea/gitea.git
				synced 2025-10-28 03:46:18 +01:00 
			
		
		
		
	The name cmd is already used in many places and may cause conflicts, so I chose `gitcmd` instead to minimize potential naming conflicts.
		
			
				
	
	
		
			15 lines
		
	
	
		
			321 B
		
	
	
	
		
			Go
		
	
	
	
	
	
			
		
		
	
	
			15 lines
		
	
	
		
			321 B
		
	
	
	
		
			Go
		
	
	
	
	
	
| // Copyright 2025 The Gitea Authors. All rights reserved.
 | |
| // SPDX-License-Identifier: MIT
 | |
| 
 | |
| package gitcmd
 | |
| 
 | |
| import "fmt"
 | |
| 
 | |
| // ConcatenateError concatenats an error with stderr string
 | |
| func ConcatenateError(err error, stderr string) error {
 | |
| 	if len(stderr) == 0 {
 | |
| 		return err
 | |
| 	}
 | |
| 	return fmt.Errorf("%w - %s", err, stderr)
 | |
| }
 |