Troubleshooting
By the end of this chapter you can take the eight ways a Glow run most commonly surprises its user and match each to its cause and fix. Symptoms are stated as you would meet them.
| Symptom | Likely cause | Fix |
|---|---|---|
| Output is plain in a script or pipe | auto falls back to notty off a terminal |
Intended; force with -s dark only if the receiver wants codes (ch. 6) |
| Glow reads a different document than the one named | stdin is not a terminal, and stdin wins | glow file.md < /dev/null (ch. 6) |
| Glow pauses about ten seconds at startup | the terminal never answered its colour questions | Wait it out, or pin -s dark / -s light (ch. 8) |
Colour everywhere despite NO_COLOR |
Glow does not honour NO_COLOR |
Ask for -s notty explicitly (ch. 6) |
Footnotes appear as [^1] litter |
footnotes are not rendered | Read footnote-bearing documents in a browser (ch. 5, 14) |
| A picture shows as a line of text with a path | images render as captions, by design | The browser is the reader for figures (ch. 5) |
| The browser does not list my file | the file lacks a Markdown extension | Rename it, or open it directly by path (ch. 11) |
Error: specified style does not exist |
unknown style name, or a JSON path that does not resolve | Check the name against ch. 8's list; check the path |
The four that deserve prose:
"It worked in my terminal and went plain in the script"
Two different rules can produce this,
and both are in chapter 6. If the
output changed, it is the pipe rule:
off a terminal, auto means notty,
and a style set in the configuration
file is ignored too โ only a flag
forces colour into a pipe. If the
document changed, it is the stdin
rule: the script's stdin was not a
terminal, so Glow read that instead
of your file. The two together explain
nearly every "Glow behaves differently
in cron" report a reader will ever
have.
"I edited glow.yml and nothing changed"
Work the three suspects in order.
First, which file: glow config
shows the file Glow actually rewrites;
if you edited a copy elsewhere,
nothing was ever going to change.
Second, which setting: a style:
edit has no effect on piped runs
(chapter 12). Third, how you pointed
at the file: a rendering run was
observed ignoring settings reached
through --config <path>; settings at
the default location, or under an
XDG_CONFIG_HOME you control, are
the reliable route.
"The page is 80 wide on my huge monitor"
Not a fault: the printed page never
consults the window (chapter 9). Set
-w or width: to taste โ or use
the built-in pager (-t), which is
the one exit that renders at the
window's real width.
"It says the file does not exist, and the file is right there"
Check the argument's shape before the
disk. glow owner/repo is a path,
not a fetch โ the shorthand needs its
domain: glow github.com/owner/repo
(chapter 10). And two file arguments
are refused outright ("accepts at
most 1 arg(s)"): read documents one
at a time, or open the browser in
their folder and walk between them.
Check: pick any symptom you have personally met, find its row, and follow the fix to a run that behaves. If the table got you there, it has done its job.