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:
parent
e468e15672
commit
adb90e4e7c
|
|
@ -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()
|
||||
|
|
|
|||
Reference in New Issue