diff --git a/contrib/executor/zap/pkg/runner/runner.go b/contrib/executor/zap/pkg/runner/runner.go index 4779db2015..939819ac55 100644 --- a/contrib/executor/zap/pkg/runner/runner.go +++ b/contrib/executor/zap/pkg/runner/runner.go @@ -57,7 +57,7 @@ func (r *ZapRunner) Run(ctx context.Context, execution testkube.Execution) (resu } output.PrintLogf("%s Preparing for test run", ui.IconTruck) - testFile, wrk, err := content.GetPathAndWorkingDir(execution.Content, r.Params.DataDir) + testFile, _, err := content.GetPathAndWorkingDir(execution.Content, r.Params.DataDir) if err != nil { output.PrintLogf("%s Failed to resolve absolute directory for %s, using the path directly", ui.IconWarning, r.Params.DataDir) } @@ -166,11 +166,7 @@ func (r *ZapRunner) Run(ctx context.Context, execution testkube.Execution) (resu if execution.PostRunScript != "" && execution.ExecutePostRunScriptBeforeScraping { output.PrintLog(fmt.Sprintf("%s Running post run script...", ui.IconCheckMark)) - if wrk == "" { - wrk = r.Params.WorkingDir - } - - if err = agent.RunScript(execution.PostRunScript, wrk); err != nil { + if err = agent.RunScript(execution.PostRunScript, r.Params.WorkingDir); err != nil { output.PrintLogf("%s Failed to execute post run script %s", ui.IconWarning, err) } }