Skip to content

Commit

Permalink
fix: remove var
Browse files Browse the repository at this point in the history
  • Loading branch information
vsukhin committed Oct 24, 2023
1 parent a4523b2 commit 40bcd2f
Showing 1 changed file with 2 additions and 6 deletions.
8 changes: 2 additions & 6 deletions contrib/executor/zap/pkg/runner/runner.go
Original file line number Diff line number Diff line change
Expand Up @@ -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)
}
Expand Down Expand Up @@ -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)
}
}
Expand Down

0 comments on commit 40bcd2f

Please sign in to comment.