From 3c020b14217a87b90ad68ca81636597f6439e846 Mon Sep 17 00:00:00 2001 From: Michal Wieczorek Date: Sun, 4 Sep 2016 23:55:35 +0200 Subject: [PATCH] Close job temp file --- command/helpers.go | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/command/helpers.go b/command/helpers.go index 9e64b974cf8..e27ed09b829 100644 --- a/command/helpers.go +++ b/command/helpers.go @@ -255,6 +255,10 @@ func (j *JobGetter) StructJob(jpath string) (*structs.Job, error) { } defer os.Remove(job.Name()) + if err := job.Close(); err != nil { + return nil, err + } + // Get the pwd pwd, err := os.Getwd() if err != nil {