diff options
author | Adam Harrison <adamdharrison@gmail.com> | 2023-06-13 11:09:18 -0400 |
---|---|---|
committer | Adam Harrison <adamdharrison@gmail.com> | 2023-06-13 11:09:18 -0400 |
commit | efa75cb17fd413f47e3eba4997bfd4c46494bffb (patch) | |
tree | 49e946bd5935a2dc39e4566477a26d2c513aed03 | |
parent | 5f297f2d98f7a289c46cb0580b24736af475e654 (diff) | |
download | lite-xl-plugin-manager-efa75cb17fd413f47e3eba4997bfd4c46494bffb.tar.gz lite-xl-plugin-manager-efa75cb17fd413f47e3eba4997bfd4c46494bffb.zip |
Colorized error.
-rw-r--r-- | src/lpm.lua | 3 |
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 |