diff options
Diffstat (limited to 'test')
| -rw-r--r-- | test/render.lua | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/test/render.lua b/test/render.lua index 7d48d0e..3ed5f7e 100644 --- a/test/render.lua +++ b/test/render.lua @@ -29,7 +29,9 @@ local sw, sh = 2560, 1080 -- The palette, read from the rendered conky.conf exactly as dashboard.lua -- does, so the PNG uses the real scheme rather than invented colours. local function config_colors() - local path = os.getenv('HOME') .. '/.config/conky/conky.conf' + local home = os.getenv('HOME') + if not home then return {} end + local path = home .. '/.config/conky/conky.conf' local f = io.open(path, 'r') if not f then return {} end local src = f:read('*a') @@ -79,7 +81,10 @@ if not ok then os.exit(1) end local drew, err = pcall(mod.draw, cr, rect, colors) -if not drew then print('DRAW ERROR: ' .. tostring(err)) end +if not drew then + print('DRAW ERROR: ' .. tostring(err)) + os.exit(1) +end cairo_destroy(cr) cairo_surface_write_to_png(surf, out) |
