execute: skip sandbox config loading when Yolo is set

Previously loadSandboxConfig was called unconditionally, causing
failures on hosts without ~/.config/ollie/sandbox/ even when yolo
mode was enabled. Move the load inside the !Yolo branch.
This commit is contained in:
ollie 2026-07-19 18:44:25 +02:00
parent e468e15672
commit adb90e4e7c
1 changed files with 7 additions and 3 deletions

View File

@ -627,9 +627,13 @@ func (e *Server) executeWithStdin(ctx context.Context, code, language string, ti
}
}
cfg, err := loadSandboxConfig(sandboxName)
if err != nil {
return "", err
var cfg *sandbox.Config
var err error
if !e.Yolo {
cfg, err = loadSandboxConfig(sandboxName)
if err != nil {
return "", err
}
}
e.wdMu.RLock()