diff options
author | Hans Hagen <pragma@wxs.nl> | 2023-05-29 14:53:42 +0200 |
---|---|---|
committer | Context Git Mirror Bot <phg@phi-gamma.net> | 2023-05-29 14:53:42 +0200 |
commit | f9dc65246f5d46583d00db93761929b6c6b5bf20 (patch) | |
tree | fc0072c7f9788452cc2b0dc2b729baec9570886c /scripts/context/lua/mtx-install.lua | |
parent | 1bcb61ec8c01b503740bfeb8cc9d5f62553b3f72 (diff) | |
download | context-f9dc65246f5d46583d00db93761929b6c6b5bf20.tar.gz |
2023-05-29 14:15:00
Diffstat (limited to 'scripts/context/lua/mtx-install.lua')
-rw-r--r-- | scripts/context/lua/mtx-install.lua | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/scripts/context/lua/mtx-install.lua b/scripts/context/lua/mtx-install.lua index 64200ef2e..ad2e629dc 100644 --- a/scripts/context/lua/mtx-install.lua +++ b/scripts/context/lua/mtx-install.lua @@ -63,7 +63,11 @@ local function fetch(url) data, detail = httprequest(url) end if type(data) ~= "string" then - data = false + data = false + detail = "download failed" + elseif #data == 0 then + data = false + detail = "download failed, zero length" elseif #data < 2048 then local n, t = find(data,"<head>%s*<title>%s*(%d+)%s(.-)</title>") if tonumber(n) then @@ -557,8 +561,8 @@ function install.update() local cdir = currentdir() local pdir = pushdir(binpath) - report("current : %S",cdir) - report("target : %S",pdir) + report("current : %S",cdir or "<unable to check the curent path>") + report("target : %S",pdir or "<unable to change to the binary path>") if pdir ~= cdir then |