fix(cmd/joj3): setup conf name attr
All checks were successful
submodules sync / sync (push) Successful in 44s
build / build (push) Successful in 1m28s
build / trigger-build-image (push) Successful in 7s

This commit is contained in:
张泊明518370910136 2024-11-15 20:10:37 -05:00
parent e808408170
commit 01d5c635d4
GPG Key ID: D47306D7062CDA9D

View File

@ -7,6 +7,7 @@ import (
"os"
"github.com/joint-online-judge/JOJ3/cmd/joj3/conf"
"github.com/joint-online-judge/JOJ3/cmd/joj3/env"
"github.com/joint-online-judge/JOJ3/cmd/joj3/stage"
"github.com/joint-online-judge/JOJ3/cmd/joj3/teapot"
internalStage "github.com/joint-online-judge/JOJ3/internal/stage"
@ -86,6 +87,7 @@ func mainImpl() (err error) {
return err
}
slog.Debug("conf loaded", "conf", confObj)
env.Attr.ConfName = confObj.Name
if err := setupSlog(confObj.LogPath); err != nil { // after conf is loaded
slog.Error("setup slog", "error", err)
return err