aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAdam Harrison <adamdharrison@gmail.com>2023-06-13 11:09:18 -0400
committerAdam Harrison <adamdharrison@gmail.com>2023-06-13 11:09:18 -0400
commitefa75cb17fd413f47e3eba4997bfd4c46494bffb (patch)
tree49e946bd5935a2dc39e4566477a26d2c513aed03
parent5f297f2d98f7a289c46cb0580b24736af475e654 (diff)
downloadlite-xl-plugin-manager-efa75cb17fd413f47e3eba4997bfd4c46494bffb.tar.gz
lite-xl-plugin-manager-efa75cb17fd413f47e3eba4997bfd4c46494bffb.zip
Colorized error.
-rw-r--r--src/lpm.lua3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/lpm.lua b/src/lpm.lua
index 94c6c93..02e5c6f 100644
--- a/src/lpm.lua
+++ b/src/lpm.lua
@@ -481,6 +481,7 @@ end
local Addon, Repository, LiteXL, Bottle = {}, {}, {}, {}
local colors = {
+ red = 31,
green = 32,
yellow = 33,
blue = 34,
@@ -534,7 +535,7 @@ local function error_handler(err)
io.stderr:write(json.encode({ error = message or err, actions = actions, warnings = warnings }) .. "\n")
end
else
- if err then io.stderr:write((not VERBOSE and message or err) .. "\n") end
+ if err then io.stderr:write(colorize((not VERBOSE and message or err) .. "\n", "red")) end
if VERBOSE then io.stderr:write(debug.traceback(nil, 2) .. "\n") end
end
status = -1