diff options
Diffstat (limited to 'modules/git/repo.go')
-rw-r--r-- | modules/git/repo.go | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/modules/git/repo.go b/modules/git/repo.go index ff704138a7..79a540209c 100644 --- a/modules/git/repo.go +++ b/modules/git/repo.go @@ -204,7 +204,13 @@ func Push(ctx context.Context, repoPath string, opts PushOptions) error { opts.Timeout = -1 } - err := cmd.RunInDirTimeoutEnvPipeline(opts.Env, opts.Timeout, repoPath, &outbuf, &errbuf) + err := cmd.RunWithContext(&RunContext{ + Env: opts.Env, + Timeout: opts.Timeout, + Dir: repoPath, + Stdout: &outbuf, + Stderr: &errbuf, + }) if err != nil { if strings.Contains(errbuf.String(), "non-fast-forward") { return &ErrPushOutOfDate{ |