Skip to content

Commit

Permalink
fix the stop_on_error is false configuration does not work (#555)
Browse files Browse the repository at this point in the history
  • Loading branch information
pyjcode authored Sep 21, 2024
1 parent 6761441 commit b9384e5
Showing 1 changed file with 8 additions and 6 deletions.
14 changes: 8 additions & 6 deletions runner/engine.go
Original file line number Diff line number Diff line change
Expand Up @@ -507,12 +507,14 @@ func (e *Engine) runBin() error {
} else {
e.mainDebug("cmd killed, pid: %d", pid)
}
cmdBinPath := cmdPath(e.config.rel(e.config.binPath()))
if _, err = os.Stat(cmdBinPath); os.IsNotExist(err) {
return
}
if err = os.Remove(cmdBinPath); err != nil {
e.mainLog("failed to remove %s, error: %s", e.config.rel(e.config.binPath()), err)
if e.config.Build.StopOnError {
cmdBinPath := cmdPath(e.config.rel(e.config.binPath()))
if _, err = os.Stat(cmdBinPath); os.IsNotExist(err) {
return
}
if err = os.Remove(cmdBinPath); err != nil {
e.mainLog("failed to remove %s, error: %s", e.config.rel(e.config.binPath()), err)
}
}
}

Expand Down

0 comments on commit b9384e5

Please sign in to comment.