diff options
author | Adam Harrison <adamdharrison@gmail.com> | 2022-11-29 22:21:05 -0500 |
---|---|---|
committer | Adam Harrison <adamdharrison@gmail.com> | 2022-11-29 22:21:05 -0500 |
commit | 4ccf28d2a2ab199d8f21ee9d7d5725e6f6acf885 (patch) | |
tree | 8f80dd6548855f5e8a6d04e54c4b6af8bd77f8b7 /src/lpm.lua | |
parent | f2290b27f158c656462a507f56fd2777183cb273 (diff) | |
download | lite-xl-plugin-manager-4ccf28d2a2ab199d8f21ee9d7d5725e6f6acf885.tar.gz lite-xl-plugin-manager-4ccf28d2a2ab199d8f21ee9d7d5725e6f6acf885.zip |
Better error handling.
Diffstat (limited to 'src/lpm.lua')
-rw-r--r-- | src/lpm.lua | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/src/lpm.lua b/src/lpm.lua index c1c9ab9..b38a231 100644 --- a/src/lpm.lua +++ b/src/lpm.lua @@ -459,6 +459,7 @@ local function prompt(message) end function common.get(source, target, checksum) + if not source then error("requires url") end local _, _, protocol, hostname, port, rest = source:find("^(https?)://([^:/?]+):?(%d*)(.*)$") if not protocol then error("malfomed url " .. source) end if not port or port == "" then port = protocol == "https" and 443 or 80 end |