aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorAdam Harrison <adamdharrison@gmail.com>2024-03-04 17:21:29 -0500
committerAdam Harrison <adamdharrison@gmail.com>2024-03-04 17:21:29 -0500
commit4ac6bf5a4b4728abfcae7b06b30a0dd17f8735c0 (patch)
treeef45dca8583e95d5ee60dc0fe2195034dda81253 /src
parent4ef4e13eccab132cd2f1a48228e327d04dcbbe98 (diff)
downloadlite-xl-plugin-manager-4ac6bf5a4b4728abfcae7b06b30a0dd17f8735c0.tar.gz
lite-xl-plugin-manager-4ac6bf5a4b4728abfcae7b06b30a0dd17f8735c0.zip
Should fix bug where we're expecting a string back.
Diffstat (limited to 'src')
-rw-r--r--src/lpm.lua3
1 files changed, 1 insertions, 2 deletions
diff --git a/src/lpm.lua b/src/lpm.lua
index bfb84f8..5307a0a 100644
--- a/src/lpm.lua
+++ b/src/lpm.lua
@@ -524,7 +524,6 @@ local function log_progress_action(message)
end
end
local function prompt(message)
- io.stdin:flush()
if not ASSUME_YES or not JSON then
io.stderr:write(colorize(message .. " [Y/n]: ", "cyan"))
if ASSUME_YES then io.stderr:write("Y\n") end
@@ -583,7 +582,7 @@ function common.get(source, options)
if headers.location then return common.get(headers.location, common.merge(options, { depth = (depth or 0) + 1 })) end
if checksum ~= "SKIP" and system.hash(cache_path, "file") ~= checksum then fatal_warning("checksum doesn't match for " .. source) end
end
- common.copy(cache_path, target)
+ if target then common.copy(cache_path, target) else res = io.open(cache_path, "rb"):read("*all") end
return res
end