Training finds the engines where the installer puts them when agent.yaml names no directory

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
This commit is contained in:
Ilker ManapandClaude Opus 5.5 committed 2026-10-08 20:55:50 +02:00
1 parent 79b3e9f887
commit 88cbf11570
1 file changed
+7 -1
+7 -1
View File
@@ -194,7 +194,13 @@ func New(cfg Config, httpClient connectHTTPClient, log *slog.Logger) (*Agent, er
if runAs == "" {
runAs = supervisor.DefaultRunAs
}
a.trainer = train.New(train.Env{EnginesDir: cfg.EnginesDir, WorkDir: filepath.Join(cfg.Superv.WorkDir, "trainer"),
// Where the engines are, as the installer has it when the file says
// nothing.
enginesDir := cfg.EnginesDir
if enginesDir == "" {
enginesDir = provision.DefaultRoot
}
a.trainer = train.New(train.Env{EnginesDir: enginesDir, WorkDir: filepath.Join(cfg.Superv.WorkDir, "trainer"),
RunAs: runAs, Log: log})
return a, nil
}