From 7549a7e1b57831cf6b08ce4700fc6e53417919f9 Mon Sep 17 00:00:00 2001 From: Taras Madan Date: Fri, 21 Jul 2023 11:54:11 +0200 Subject: all: use special placeholder for errors --- pkg/instance/execprog.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'pkg/instance/execprog.go') diff --git a/pkg/instance/execprog.go b/pkg/instance/execprog.go index 8f052f629..9e97dcd0c 100644 --- a/pkg/instance/execprog.go +++ b/pkg/instance/execprog.go @@ -83,7 +83,7 @@ func CreateExecProgInstance(vmPool *vm.Pool, vmIndex int, mgrCfg *mgrconfig.Conf reporter *report.Reporter, opt *OptionalConfig) (*ExecProgInstance, error) { vmInst, err := vmPool.Create(vmIndex) if err != nil { - return nil, fmt.Errorf("failed to create VM: %v", err) + return nil, fmt.Errorf("failed to create VM: %w", err) } ret, err := SetupExecProg(vmInst, mgrCfg, reporter, opt) if err != nil { @@ -109,7 +109,7 @@ func (inst *ExecProgInstance) runCommand(command string, duration time.Duration) } outc, errc, err := inst.VMInstance.Run(duration, nil, command) if err != nil { - return nil, fmt.Errorf("failed to run command in VM: %v", err) + return nil, fmt.Errorf("failed to run command in VM: %w", err) } result := &RunResult{ ExecutionResult: *inst.VMInstance.MonitorExecutionRaw(outc, errc, -- cgit mrf-deployment