diff options
Diffstat (limited to 'deckit/server.py')
| -rw-r--r-- | deckit/server.py | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/deckit/server.py b/deckit/server.py index bdaca9e..38de5d3 100644 --- a/deckit/server.py +++ b/deckit/server.py @@ -116,7 +116,10 @@ def nerd_font(): if "p" not in _font: out = _run(["fc-match", "-f", "%{file}", "Inconsolata Nerd Font:style=Regular"]) # fc-match falls back to any font; only a Nerd Font has the glyphs. - _font["p"] = Path(out) if "NerdFont" in out.replace(" ", "") and Path(out).is_file() else None + found = "NerdFont" in out.replace(" ", "") and Path(out).is_file() + if not found: + return None # not cached: keep retrying until a font is installed + _font["p"] = Path(out) return _font["p"] |
