From 3f022d841fb457fb8822b5ff6b76ffa7b3e26716 Mon Sep 17 00:00:00 2001 From: Adam Harrison Date: Sun, 3 Mar 2024 15:37:32 -0500 Subject: Allowed for disabling of self-upgrade. --- src/lpm.lua | 1 + 1 file changed, 1 insertion(+) (limited to 'src/lpm.lua') diff --git a/src/lpm.lua b/src/lpm.lua index 4cbb817..2ec9f67 100644 --- a/src/lpm.lua +++ b/src/lpm.lua @@ -1986,6 +1986,7 @@ local function lpm_addon_upgrade() end local function lpm_self_upgrade(release) + if not DEFAULT_RELEASE_URL or #DEFAULT_RELEASE_URL == 0 then error("self-upgrade has been disabled on lpm version " .. VERSION .. "; please upgrade it however you installed it") end local path = ARGV[1]:find(PATHSEP) and system.stat(ARGV[1]) and ARGV[1] or common.path(ARGV[1]) if not path then error("can't find path to lpm") end release = release or "latest" -- cgit v1.2.3