aboutsummaryrefslogtreecommitdiff
path: root/src/lpm.lua
diff options
context:
space:
mode:
Diffstat (limited to 'src/lpm.lua')
-rw-r--r--src/lpm.lua1
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