Skip to content
Merged
Show file tree
Hide file tree
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
11 changes: 6 additions & 5 deletions e2e/framework/runenv/dependencies.go
Original file line number Diff line number Diff line change
Expand Up @@ -24,11 +24,12 @@ const (
// Command describes one subprocess. Env is an overlay applied to the parent
// environment of that process only; nothing mutates the global environment.
type Command struct {
Path string
Args []string
Env []string // NAME=value overlay; replaces same-named parent entries
Dir string
Timeout time.Duration
Path string
Args []string
Env []string // NAME=value overlay; replaces same-named parent entries
Dir string
Timeout time.Duration
CancelProcessGroup bool
// Stdout and Stderr optionally receive output live, in addition to the
// tail-capped capture returned in CommandResult.
Stdout io.Writer
Expand Down
5 changes: 5 additions & 0 deletions e2e/framework/runenv/exec.go
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,8 @@ import (
"strings"
"sync"
"time"

"github.com/devsy-org/devsy/pkg/docker"
)

const (
Expand Down Expand Up @@ -39,6 +41,9 @@ func (ExecRunner) Run(ctx context.Context, c Command) (CommandResult, error) {
stdout, stderr := newTailBuffer(maxCaptureBytes), newTailBuffer(maxCaptureBytes)
//nolint:gosec // G204: ExecRunner runs the command its caller specified, by design
cmd := exec.CommandContext(ctx, c.Path, c.Args...)
if c.CancelProcessGroup {
docker.PrepareForGroupCancellation(cmd)
}
cmd.Dir = c.Dir
cmd.Env = overlayEnv(os.Environ(), c.Env, runtime.GOOS == "windows")
cmd.WaitDelay = waitDelay
Expand Down
Loading
Loading