aboutsummaryrefslogtreecommitdiffstats
path: root/modules/git/command.go
diff options
context:
space:
mode:
author6543 <6543@obermui.de>2020-09-05 18:42:58 +0200
committerGitHub <noreply@github.com>2020-09-05 12:42:58 -0400
commitbc11caff94896c8c3f9a5c970a77470ed9beb83a (patch)
tree75196365a23153cb7e9d13c368fa27d75b3aecfa /modules/git/command.go
parent9fdb4f887b65a6ddacefc8c7e4580e333d7e4b95 (diff)
downloadgitea-bc11caff94896c8c3f9a5c970a77470ed9beb83a.tar.gz
gitea-bc11caff94896c8c3f9a5c970a77470ed9beb83a.zip
[Vendor] Switch go-version lib (#12719)
* vendor: switch from "mcuadros/go-version" to "hashicorp/go-version" * Adapt P1 * simplify * fix lint * adapt * fix lint & rm old code * no deadlock * rm RWMutex and check GoVersion only 1-time * Copyright header Co-authored-by: techknowlogick <techknowlogick@gitea.io>
Diffstat (limited to 'modules/git/command.go')
-rw-r--r--modules/git/command.go5
1 files changed, 2 insertions, 3 deletions
diff --git a/modules/git/command.go b/modules/git/command.go
index 2a00a0a203..e0170b1723 100644
--- a/modules/git/command.go
+++ b/modules/git/command.go
@@ -1,3 +1,4 @@
+// Copyright 2020 The Gitea Authors. All rights reserved.
// Copyright 2015 The Gogs Authors. All rights reserved.
// Use of this source code is governed by a MIT-style
// license that can be found in the LICENSE file.
@@ -11,12 +12,10 @@ import (
"io"
"os"
"os/exec"
- "runtime"
"strings"
"time"
"code.gitea.io/gitea/modules/process"
- "github.com/mcuadros/go-version"
)
var (
@@ -132,7 +131,7 @@ func (c *Command) RunInDirTimeoutEnvFullPipelineFunc(env []string, timeout time.
}
// TODO: verify if this is still needed in golang 1.15
- if version.Compare(runtime.Version(), "go1.15", "<") {
+ if goVersionLessThan115 {
cmd.Env = append(cmd.Env, "GODEBUG=asyncpreemptoff=1")
}
cmd.Dir = dir