()
| 55 | } |
| 56 | |
| 57 | func (w *wrapper) Prepare() Supervisor { |
| 58 | log(w.ctx, nil).Debug("preparing shell command") |
| 59 | |
| 60 | cmd := exec.Command(w.path, w.args...) //nolint:gosec |
| 61 | cmd.SysProcAttr = w.sysProcAttr |
| 62 | |
| 63 | // Avoid modifying the w.env, so it doesn't log the sensitive OS environment |
| 64 | env := w.env |
| 65 | if w.osEnv { |
| 66 | env = append(env, os.Environ()...) |
| 67 | } |
| 68 | cmd.Env = env |
| 69 | |
| 70 | cmd.Dir = w.dir |
| 71 | |
| 72 | w.cmd = cmd |
| 73 | |
| 74 | return w |
| 75 | } |
nothing calls this directly
no outgoing calls
no test coverage detected