mirror of
https://github.com/go-gitea/gitea.git
synced 2026-10-08 07:49:50 +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
@@ -15,6 +15,7 @@ import (
|
||||
"sync"
|
||||
|
||||
"gitea.dev/models/db"
|
||||
"gitea.dev/modules/consts"
|
||||
"gitea.dev/modules/log"
|
||||
"gitea.dev/modules/setting"
|
||||
"gitea.dev/modules/util"
|
||||
@@ -135,7 +136,7 @@ func appendAuthorizedKeysToFile(keys ...*PublicKey) error {
|
||||
defer f.Close()
|
||||
|
||||
// Note: chmod command does not support in Windows.
|
||||
if !setting.IsWindows {
|
||||
if !consts.IsWindows {
|
||||
fi, err := f.Stat()
|
||||
if err != nil {
|
||||
return err
|
||||
|
||||
Reference in new issue
Block a user