aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAdam Harrison <adamdharrison@gmail.com>2022-11-02 23:51:59 -0400
committerAdam Harrison <adamdharrison@gmail.com>2022-11-02 23:51:59 -0400
commit20b772483d09247b634f0d70fcd0b18fae8cd65c (patch)
treed74d7e21f02ad429ec2aadda21a15fcf22ea39ba
parent40fc035835d2ba1f9436c15810abce39e29ff7c3 (diff)
downloadlite-xl-plugin-manager-20b772483d09247b634f0d70fcd0b18fae8cd65c.tar.gz
lite-xl-plugin-manager-20b772483d09247b634f0d70fcd0b18fae8cd65c.zip
Added in ability to skip checksums.
-rw-r--r--src/lpm.lua6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/lpm.lua b/src/lpm.lua
index f8b730e..54bce83 100644
--- a/src/lpm.lua
+++ b/src/lpm.lua
@@ -463,7 +463,7 @@ function common.get(source, target, checksum)
local cache_path = CACHEDIR .. PATHSEP .. "files" .. PATHSEP .. checksum
if not system.stat(cache_path) then
system.get(source, cache_path)
- if system.hash(cache_path, "file") ~= checksum then fatal_warning("checksum doesn't match for " .. source) end
+ if system.hash(cache_path, "file") ~= checksum and checksum ~= "SKIP" then fatal_warning("checksum doesn't match for " .. source) end
end
common.copy(cache_path, target)
end
@@ -616,7 +616,7 @@ function Plugin:install(bottle, installing)
log_action("Downloading file " .. file.url .. "...")
common.get(file.url, temporary_path, file.checksum)
log_action("Downloaded file " .. file.url .. " to " .. path)
- if system.hash(temporary_path, "file") ~= file.checksum then fatal_warning("checksum doesn't match for " .. path) end
+ if system.hash(temporary_path, "file") ~= file.checksum and file.checksum ~= "SKIP" then fatal_warning("checksum doesn't match for " .. path) end
end
end
end
@@ -902,7 +902,7 @@ function LiteXL:install()
log_action("Downloading file " .. file.url .. "...")
common.get(file.url, path, file.checksum)
log_action("Downloaded file " .. file.url .. " to " .. path)
- if system.hash(path, "file") ~= file.checksum then fatal_warning("checksum doesn't match for " .. path) end
+ if system.hash(path, "file") ~= file.checksum and file.checksum ~= "SKIP" then fatal_warning("checksum doesn't match for " .. path) end
if archive then
log_action("Extracting file " .. basename .. " in " .. self.local_path)
system.extract(path, self.local_path)