fix(executor/sandbox): non nil stdin
Some checks failed
build / build (push) Failing after 1m20s
build / trigger-build-image (push) Has been skipped
submodules sync / sync (push) Successful in 29s

This commit is contained in:
张泊明518370910136 2026-07-22 23:18:07 -07:00
parent 3b112e0219
commit e285f33ecb
GPG Key ID: D47306D7062CDA9D

View File

@ -103,6 +103,9 @@ func (e *Sandbox) runWithTar(cmds []stage.Cmd, tarData []byte) ([]stage.Executor
tarCmd := stage.Cmd{
Args: []string{"/bin/tar", "xf", tarFileName, "-C", "/w"},
Env: cmds[0].Env,
Stdin: &stage.CmdFile{Content: strPtr("")},
Stdout: &stage.CmdFile{Name: strPtr("__tar_stdout"), Max: int64Ptr(1)},
Stderr: &stage.CmdFile{Name: strPtr("__tar_stderr"), Max: int64Ptr(1)},
CPULimit: cmds[0].CPULimit,
ClockLimit: cmds[0].ClockLimit,
MemoryLimit: cmds[0].MemoryLimit,
@ -326,3 +329,7 @@ func (e *Sandbox) Cleanup() error {
}
return nil
}
func strPtr(s string) *string { return &s }
func int64Ptr(i int64) *int64 { return &i }