1
0
forked from JOJ/JOJ3

fix(executor/local): append env

This commit is contained in:
张泊明518370910136 2024-12-05 13:20:54 -05:00
parent d0c6d27637
commit 7e5dbd733e
Signed by untrusted user: 张泊明518370910136
GPG Key ID: D47306D7062CDA9D

View File

@ -22,11 +22,11 @@ func (e *Local) Run(cmds []stage.Cmd) ([]stage.ExecutorResult, error) {
for _, cmd := range cmds {
execCmd := exec.Command(cmd.Args[0], cmd.Args[1:]...) // #nosec G204
env := os.Environ()
if len(cmd.Env) > 0 {
env := os.Environ()
env = append(env, cmd.Env...)
execCmd.Env = env
}
execCmd.Env = env
if cmd.Stdin != nil {
if cmd.Stdin.Content != nil {