[latex3-commits] [git/LaTeX3-latex3-l3build] curl-file: close curl option file before passing to curl (4e5aebc)

David Carlisle d.p.carlisle at gmail.com
Sun Feb 3 14:33:27 CET 2019


Repository : https://github.com/latex3/l3build
On branch  : curl-file
Link       : https://github.com/latex3/l3build/commit/4e5aebc567aa156edce739001f753f6e7caabde5

>---------------------------------------------------------------

commit 4e5aebc567aa156edce739001f753f6e7caabde5
Author: David Carlisle <d.p.carlisle at gmail.com>
Date:   Sun Feb 3 13:33:27 2019 +0000

    close curl option file before passing to curl


>---------------------------------------------------------------

4e5aebc567aa156edce739001f753f6e7caabde5
 l3build-upload.lua |    8 ++++++--
 1 file changed, 6 insertions(+), 2 deletions(-)

diff --git a/l3build-upload.lua b/l3build-upload.lua
index 97e846b..f95aac4 100644
--- a/l3build-upload.lua
+++ b/l3build-upload.lua
@@ -29,6 +29,7 @@ local tostring = tostring
 local close = io.close
 local flush = io.flush
 local open  = io.open
+local output = io.output
 local popen = io.popen
 local read  = io.read
 local write = io.write
@@ -116,8 +117,11 @@ function upload(tagnames)
   ctan_post = construct_ctan_post(uploadfile,options["debug"])
 
 -- curl file version
-  io.output(ctanzip .. ".curlopt")
-  io.write(ctan_post)
+  local curlopt=open(ctanzip .. ".curlopt","w")
+  output(curlopt)
+  write(ctan_post)
+  close(curlopt)
+  
   ctan_post=curlexe .. " --config " .. ctanzip .. ".curlopt"
   
   if options["debug"] then





More information about the latex3-commits mailing list