diff options
Diffstat (limited to 'pkg/instance')
| -rw-r--r-- | pkg/instance/execprog.go | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/pkg/instance/execprog.go b/pkg/instance/execprog.go index 0b9f9ebf7..7c97819f4 100644 --- a/pkg/instance/execprog.go +++ b/pkg/instance/execprog.go @@ -126,10 +126,14 @@ func (inst *ExecProgInstance) runCommand(command string, duration time.Duration, } ctxTimeout, cancel := context.WithTimeout(context.Background(), duration) defer cancel() - output, rep, err := inst.VMInstance.Run(ctxTimeout, inst.reporter, command, + output, reps, err := inst.VMInstance.Run(ctxTimeout, inst.reporter, command, vm.WithExitCondition(exitCondition), optionalBeforeContext, ) + var rep *report.Report + if len(reps) > 0 { + rep = reps[0] + } if err != nil { return nil, fmt.Errorf("failed to run command in VM: %w", err) } |
