Skip to content

Commit

Permalink
Change the official Lua URL from www.lua.org to lua.org
Browse files Browse the repository at this point in the history
the file cannot be retrieved because the updated server certificate is
not a wildcard certificate.
  • Loading branch information
mah0x211 committed Dec 21, 2023
1 parent 1efd713 commit 1bea61a
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 2 deletions.
6 changes: 6 additions & 0 deletions fetch.go
Original file line number Diff line number Diff line change
Expand Up @@ -153,6 +153,12 @@ func CmdFetch() {
}
defer rsp.Body.Close()

// check status code
if rsp.StatusCode != http.StatusOK {
eprintf("failed to download %q: %s\n", target.cfg.ReleaseURL, rsp.Status)
continue
}

b, err := io.ReadAll(rsp.Body)
if err != nil {
eprintf("failed to read body: %v\n", err)
Expand Down
4 changes: 2 additions & 2 deletions main.go
Original file line number Diff line number Diff line change
Expand Up @@ -31,8 +31,8 @@ var (
Name: "lua",
RootDir: filepath.Join(LenvDir, "lua"),
VersionFile: filepath.Join(LenvDir, "lua_vers.txt"),
ReleaseURL: "http://www.lua.org/ftp/",
DownloadURL: "http://www.lua.org/ftp/",
ReleaseURL: "http://lua.org/ftp/",
DownloadURL: "http://lua.org/ftp/",
}
LuaJitCfg = &TargetConfig{
Name: "luajit",
Expand Down

0 comments on commit 1bea61a

Please sign in to comment.