File tree 3 files changed +16
-2
lines changed
3 files changed +16
-2
lines changed Original file line number Diff line number Diff line change @@ -83,6 +83,14 @@ $ lenv vers
83
83
...snip...
84
84
` ` `
85
85
86
+ ** Package URL' s**
87
+
88
+ the following URL' s are used to download the version files and source files.
89
+
90
+ - Lua: https://lua.org/ftp/
91
+ - LuaJIT: https://github.com/LuaJIT/LuaJIT.git
92
+ - LuaRocks: https://luarocks.github.io/luarocks/releases/
93
+
86
94
87
95
# # Usage
88
96
Original file line number Diff line number Diff line change @@ -153,6 +153,12 @@ func CmdFetch() {
153
153
}
154
154
defer rsp .Body .Close ()
155
155
156
+ // check status code
157
+ if rsp .StatusCode != http .StatusOK {
158
+ eprintf ("failed to download %q: %s\n " , target .cfg .ReleaseURL , rsp .Status )
159
+ continue
160
+ }
161
+
156
162
b , err := io .ReadAll (rsp .Body )
157
163
if err != nil {
158
164
eprintf ("failed to read body: %v\n " , err )
Original file line number Diff line number Diff line change 31
31
Name : "lua" ,
32
32
RootDir : filepath .Join (LenvDir , "lua" ),
33
33
VersionFile : filepath .Join (LenvDir , "lua_vers.txt" ),
34
- ReleaseURL : "http://www. lua.org/ftp/" ,
35
- DownloadURL : "http://www. lua.org/ftp/" ,
34
+ ReleaseURL : "http://lua.org/ftp/" ,
35
+ DownloadURL : "http://lua.org/ftp/" ,
36
36
}
37
37
LuaJitCfg = & TargetConfig {
38
38
Name : "luajit" ,
You can’t perform that action at this time.
0 commit comments