Skip to content

Commit

Permalink
Merge pull request #160 from hashicorp/close_temp_file
Browse files Browse the repository at this point in the history
make tmpFile close the newly created file in case a future task need to delete it
  • Loading branch information
azr authored Jan 31, 2019
2 parents dde89f9 + dee4c79 commit dc089b3
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions common.go
Original file line number Diff line number Diff line change
Expand Up @@ -9,5 +9,6 @@ func tmpFile(dir, pattern string) (string, error) {
if err != nil {
return "", err
}
f.Close()
return f.Name(), nil
}

0 comments on commit dc089b3

Please sign in to comment.