mirror of
https://github.com/go-gitea/gitea.git
synced 2026-10-24 09:59:24 +02:00
refactor: clarify GOOS detection (#39620)
Introduce `consts.IsWindows`, now it's clearer to see how Windows build works
This commit is contained in:
1 parent
052f660ba5
commit
1065f03454
16 files changed
+44
-37
No files matched your search
@@ -8,9 +8,9 @@ import (
|
||||
"fmt"
|
||||
"os"
|
||||
"regexp"
|
||||
"runtime"
|
||||
"strings"
|
||||
|
||||
"gitea.dev/modules/consts"
|
||||
"gitea.dev/modules/git/gitcmd"
|
||||
"gitea.dev/modules/setting"
|
||||
)
|
||||
@@ -90,7 +90,7 @@ func syncGitConfig(ctx context.Context) (err error) {
|
||||
return err
|
||||
}
|
||||
|
||||
if runtime.GOOS == "windows" {
|
||||
if consts.IsWindows {
|
||||
if err := configSet(ctx, "core.longpaths", "true"); err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user