This commit is contained in:
wxiaoguang
2026-04-25 18:13:14 +08:00
parent 11f910c80c
commit 1591c06395
2 changed files with 4 additions and 0 deletions

View File

@@ -279,6 +279,7 @@ func loadServerFrom(rootCfg ConfigProvider) {
StaticCacheTime = sec.Key("STATIC_CACHE_TIME").MustDuration(6 * time.Hour)
AppDataPath = sec.Key("APP_DATA_PATH").MustString(filepath.Join(AppWorkPath, "data"))
// FIXME: debug
log.Error("Set AppDataPath=%s\n%s\n", AppDataPath, log.Stack(2))
if !filepath.IsAbs(AppDataPath) {

View File

@@ -66,6 +66,9 @@ func SetupGiteaTestEnv() {
customConfBuiltin = filepath.Join(AppWorkPath, giteaConf)
CustomConf = customConfBuiltin
_ = os.WriteFile(CustomConf, []byte(os.Getenv("GITEA_TEST_CONF_CONTENT")), 0o644)
// FIXME: debug
log.Error("SetupGiteaTestEnv CustomConf=%s\n%s\n%s\n", CustomConf, os.Getenv("GITEA_TEST_CONF_CONTENT"), log.Stack(2))
} else {
// CustomConf must be absolute path to make tests pass,
CustomConf = filepath.Join(AppWorkPath, giteaConf)