Skip to content

Commit

Permalink
fixed log FP not being closed
Browse files Browse the repository at this point in the history
  • Loading branch information
johnuopini committed Jun 6, 2022
1 parent f0e257e commit 5b1163f
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions internal/runner/job.go
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,7 @@ func (j *Job) Exec() JobResult {
f, err := os.OpenFile(scriptPath, os.O_WRONLY|os.O_CREATE|os.O_TRUNC, 0700)
if err == nil {
_, err = f.WriteString(script)
_ = f.Close()
}
if err != nil {
log.Printf("Cannot write script at line %v, %v\n", j.line, err)
Expand Down

0 comments on commit 5b1163f

Please sign in to comment.