diff options
Diffstat (limited to 'forged/internal/unsorted/server.go')
-rw-r--r-- | forged/internal/unsorted/server.go | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/forged/internal/unsorted/server.go b/forged/internal/unsorted/server.go index c7caa76..7d1319d 100644 --- a/forged/internal/unsorted/server.go +++ b/forged/internal/unsorted/server.go @@ -55,10 +55,6 @@ func NewServer(configPath string) (*Server, error) { globalData: make(map[string]any), } //exhaustruct:ignore - if err := s.loadConfig(configPath); err != nil { - return s, err - } - s.sourceHandler = http.StripPrefix( "/-/source/", http.FileServer(http.FS(embed.Source)), @@ -75,6 +71,10 @@ func NewServer(configPath string) (*Server, error) { // Some other ones are populated after config parsing } + if err := s.loadConfig(configPath); err != nil { + return s, err + } + misc.NoneOrPanic(s.loadTemplates()) misc.NoneOrPanic(misc.DeployBinary(misc.FirstOrPanic(embed.Resources.Open("git2d/git2d")), s.config.Git.DaemonPath)) misc.NoneOrPanic(misc.DeployBinary(misc.FirstOrPanic(embed.Resources.Open("hookc/hookc")), filepath.Join(s.config.Hooks.Execs, "pre-receive"))) |