From 0b7aee8147902c132dd309cdf9f773da34286144 Mon Sep 17 00:00:00 2001 From: wxiaoguang Date: Sat, 25 Apr 2026 19:59:18 +0800 Subject: [PATCH] fix --- cmd/cmdtest/cmd_test.go | 2 +- modules/setting/testenv.go | 6 +----- 2 files changed, 2 insertions(+), 6 deletions(-) diff --git a/cmd/cmdtest/cmd_test.go b/cmd/cmdtest/cmd_test.go index 3473013fd27..c7c269e5648 100644 --- a/cmd/cmdtest/cmd_test.go +++ b/cmd/cmdtest/cmd_test.go @@ -2,7 +2,7 @@ // SPDX-License-Identifier: MIT // Tests here reload the config system multiple times with uncontrollable details. -// So it must be in a separate package, to avoid affecting other tests +// So they must be in a separate package, to avoid affecting other tests package cmdtest diff --git a/modules/setting/testenv.go b/modules/setting/testenv.go index 3ffb22109e5..1c06fbb6809 100644 --- a/modules/setting/testenv.go +++ b/modules/setting/testenv.go @@ -12,7 +12,6 @@ import ( "code.gitea.io/gitea/modules/auth/password/hash" "code.gitea.io/gitea/modules/log" - "code.gitea.io/gitea/modules/util" ) var giteaTestSourceRoot *string @@ -51,10 +50,7 @@ func SetupGiteaTestEnv() { } initGiteaPaths := func() { - appWorkPathBuiltin = *giteaTestSourceRoot - AppWorkPath = appWorkPathBuiltin - AppPath = filepath.Join(AppWorkPath, "gitea") + util.Iif(IsWindows, ".exe", "") - StaticRootPath = AppWorkPath // need to load assets (options, public) from the source code directory for testing + StaticRootPath = *giteaTestSourceRoot // need to load assets (options, public) from the source code directory for testing } initGiteaConf := func() string {