gist-logs: close temp file before passing to curl (#418)

Ensures that the data gets written to disk so curl can see it, avoiding
intermittent JSON parsing errors in gist creation.
This commit is contained in:
Andrew Janke 2016-07-03 17:21:13 -04:00 committed by Mike McQuaid
parent 0478c2fc0f
commit f4b3dadb64

View File

@ -140,6 +140,7 @@ module GitHub
begin begin
if data if data
data_tmpfile.write data data_tmpfile.write data
data_tmpfile.close
args += ["--data", "@#{data_tmpfile.path}"] args += ["--data", "@#{data_tmpfile.path}"]
end end