From 2f328ee5957c53b18af19054bc8610538cf49c4c Mon Sep 17 00:00:00 2001 From: Andrew Hamilton Date: Sun, 9 Jan 2022 11:20:41 +1000 Subject: [PATCH] Some paths have no lscolors entry. - Using the default style, white on black. --- eris/eris/tools.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/eris/eris/tools.py b/eris/eris/tools.py index d9491b8..03f7a8d 100755 --- a/eris/eris/tools.py +++ b/eris/eris/tools.py @@ -697,6 +697,8 @@ def run_tool_no_error(path, tool): def _charstyle_of_path(path): color_code = lscolors.color_code_for_path(path, _LS_COLOR_CODES) + if color_code is None: + return termstr.CharStyle() term_text = termstr.ESC + "[" + color_code + "m-" return termstr.TermStr.from_term(term_text).style[0]