aboutsummaryrefslogtreecommitdiffhomepage
path: root/internal
diff options
context:
space:
mode:
authorOphestra <cat@gensokyo.uk>2025-03-15 03:30:14 +0900
committerOphestra <cat@gensokyo.uk>2025-03-15 03:30:14 +0900
commit4230281194080a2c3bd72116a3e15b0e75b960f8 (patch)
tree097af861dd25f0dfe0d4394bfb0a48809a19098d /internal
parente64e7608ca47d25e81fb43d66838d9aa0ffd2e9a (diff)
sandbox: return error on doubled start
Signed-off-by: Ophestra <cat@gensokyo.uk>
Diffstat (limited to 'internal')
-rw-r--r--internal/sandbox/container.go3
1 files changed, 2 insertions, 1 deletions
diff --git a/internal/sandbox/container.go b/internal/sandbox/container.go
index 5ee5a5b4..6676a2a9 100644
--- a/internal/sandbox/container.go
+++ b/internal/sandbox/container.go
@@ -3,6 +3,7 @@ package sandbox
import (
"context"
"encoding/gob"
+ "errors"
"fmt"
"io"
"os"
@@ -111,7 +112,7 @@ type (
func (p *Container) Start() error {
if p.cmd != nil {
- panic("attempted to start twice")
+ return errors.New("sandbox: already started")
}
c, cancel := context.WithCancel(p.ctx)