Skip to content
This repository has been archived by the owner on Mar 3, 2021. It is now read-only.

Construct Cmd directly #86

Merged
merged 1 commit into from
Apr 10, 2020
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 6 additions & 3 deletions multirun/process.go
Original file line number Diff line number Diff line change
Expand Up @@ -22,9 +22,12 @@ type process struct {
}

func (p *process) run(ctx context.Context) error {
cmd := exec.Command(p.path, p.args...)
// nil means "use environment of the parent process", see the godoc. We do this explicitly to show the intent.
cmd.Env = nil
cmd := &exec.Cmd{
Path: p.path,
Args: append([]string{p.path}, p.args...),
// nil means "use environment of the parent process", see the godoc. We do this explicitly to show the intent.
Env: nil,
}
var stdout, stderr io.ReadCloser
if p.addTag {
var err error
Expand Down