瀏覽代碼

Remove async pre-empt hack if go >= 1.15 (#12718)

Signed-off-by: Andrew Thornton <art27@cantab.net>

Co-authored-by: techknowlogick <techknowlogick@gitea.io>
tags/v1.13.0-rc1
zeripath 3 年之前
父節點
當前提交
bda9e51fef
沒有連結到貢獻者的電子郵件帳戶。
共有 1 個檔案被更改,包括 5 行新增1 行删除
  1. 5
    1
      modules/git/command.go

+ 5
- 1
modules/git/command.go 查看文件

@@ -11,10 +11,12 @@ import (
"io"
"os"
"os/exec"
"runtime"
"strings"
"time"

"code.gitea.io/gitea/modules/process"
"github.com/mcuadros/go-version"
)

var (
@@ -130,7 +132,9 @@ func (c *Command) RunInDirTimeoutEnvFullPipelineFunc(env []string, timeout time.
}

// TODO: verify if this is still needed in golang 1.15
cmd.Env = append(cmd.Env, "GODEBUG=asyncpreemptoff=1")
if version.Compare(runtime.Version(), "go1.15", "<") {
cmd.Env = append(cmd.Env, "GODEBUG=asyncpreemptoff=1")
}
cmd.Dir = dir
cmd.Stdout = stdout
cmd.Stderr = stderr

Loading…
取消
儲存