From 4ac6bf5a4b4728abfcae7b06b30a0dd17f8735c0 Mon Sep 17 00:00:00 2001 From: Adam Harrison Date: Mon, 4 Mar 2024 17:21:29 -0500 Subject: Should fix bug where we're expecting a string back. --- src/lpm.lua | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'src/lpm.lua') 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 -- cgit v1.2.3