fix: 在 PullCodeHandler 和 BuildBotHandler 中添加错误日志记录,提升错误处理的可追溯性
This commit is contained in:
@@ -58,5 +58,13 @@ func GitPull() error {
|
||||
return errors.New(string(forceResetOutput) + err.Error())
|
||||
}
|
||||
|
||||
// 拉取最新代码
|
||||
pullCmd := exec.Command("git", "pull")
|
||||
pullCmd.Dir = workDir
|
||||
pullOutput, err := pullCmd.CombinedOutput()
|
||||
if err != nil {
|
||||
return errors.New(string(pullOutput) + err.Error())
|
||||
}
|
||||
|
||||
return nil
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user