fix(executor/sandbox): non nil stdin
This commit is contained in:
parent
3b112e0219
commit
e285f33ecb
|
|
@ -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 }
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user