diff options
author | Adam Harrison <adamdharrison@gmail.com> | 2023-01-16 20:15:30 -0500 |
---|---|---|
committer | Adam Harrison <adamdharrison@gmail.com> | 2023-01-16 20:15:30 -0500 |
commit | 14578e4d072e780678a7e98b14a13372809e6022 (patch) | |
tree | 0f974b000f9b10c5b5f509d507f818a86d098d78 /t | |
parent | 9067926de3753dadccecd5b899196ef82e498572 (diff) | |
download | lite-xl-plugin-manager-14578e4d072e780678a7e98b14a13372809e6022.tar.gz lite-xl-plugin-manager-14578e4d072e780678a7e98b14a13372809e6022.zip |
Updated lpm, to fix all of JGM's raised issues.v0.9991
Diffstat (limited to 't')
-rw-r--r-- | t/run.lua | 10 |
1 files changed, 8 insertions, 2 deletions
@@ -74,6 +74,7 @@ local tests = { assert(plugins[1].status == "available") local actions = lpm("install lsp") assert_exists(userdir .. "/plugins/lsp/init.lua") + assert_exists(userdir .. "/libraries/widget/init.lua") break end end @@ -85,14 +86,19 @@ local tests = { end, ["08_install_many"] = function() lpm("install encoding gitblame gitstatus language_ts lsp minimap") + end, + ["09_misc_commands"] = function() + lpm("update") + lpm("upgrade") end } local last_command_result, last_command lpm = function(cmd) - last_command = "./lpm --quiet --json --userdir=" .. userdir .. " " .. cmd + last_command = "./lpm --quiet --json --assume-yes --userdir=" .. userdir .. " " .. cmd local pipe = io.popen(last_command, "r") - last_command_result = json.decode(pipe:read("*all")) + local result = pipe:read("*all") + last_command_result = result ~= "" and json.decode(result) or nil local success = pipe:close() if not success then error("error calling lpm", 2) end return last_command_result |