mirror of
https://github.com/go-gitea/gitea
synced 2025-07-19 00:38:36 +00:00
Change git.cmd to RunWithContext (#18693)
Change all `cmd...Pipeline` commands to `cmd.RunWithContext`. #18553 Co-authored-by: Martin Scholz <martin.scholz@versasec.com>
This commit is contained in:
@@ -60,7 +60,14 @@ func (repo *Repository) CommitTree(author, committer *Signature, tree *Tree, opt
|
||||
|
||||
stdout := new(bytes.Buffer)
|
||||
stderr := new(bytes.Buffer)
|
||||
err = cmd.RunInDirTimeoutEnvFullPipeline(env, -1, repo.Path, stdout, stderr, messageBytes)
|
||||
err = cmd.RunWithContext(&RunContext{
|
||||
Env: env,
|
||||
Timeout: -1,
|
||||
Dir: repo.Path,
|
||||
Stdin: messageBytes,
|
||||
Stdout: stdout,
|
||||
Stderr: stderr,
|
||||
})
|
||||
|
||||
if err != nil {
|
||||
return SHA1{}, ConcatenateError(err, stderr.String())
|
||||
|
Reference in New Issue
Block a user