0

Good Morning,

I want to create a little Homebrew that updates the Files of a Translation Patch. The Programm will be written in Lua but the Problem is that I am not able to download the Master-Repo from Github without the git clone Command...

local http = require("socket.http")
local body, code = http.request("https://github.com/OngoGablogian/Puyo_Puyo_Tetris_Translation/archive/master.zip")
if not body then error(code) end
local f = assert(io.open('master.zip', 'wb')) -- open in "binary" mode
f:write(body)
f:close()

(I get an empty master.zip File.)

Thanks for helping me,

Lucas

PS:Hopefully you did understand me because I am very bad in English

Luro02
  • 231
  • 5
  • 9
  • The problem appears to be in your code or the , since the URL you're showing here is quite valid, and does not require git clone -- a simple HTTP request successfully fetches the content, and it is a valid zip file. You can use `curl` to verify this. Also note, `local body, code, headers, status = http.request...` You are throwing away `status` and not checking either that or `code`, as you probably should do. Please make these changes run again, and explain what you found. Also verify that you can download the file with `curl`, to rule out firewall issues, etc. – Michael - sqlbot May 14 '17 at 00:55
  • 1
    Possible duplicate of [luaSocket HTTP requests always respond with a redirect (301 or 302)](http://stackoverflow.com/questions/37555226/luasocket-http-requests-always-respond-with-a-redirect-301-or-302) – Jack Taylor May 14 '17 at 04:09

0 Answers0