fix(image): initialize image correctly

This commit is contained in:
Jan De Dobbeleer 2024-11-04 14:44:56 +01:00 committed by Jan De Dobbeleer
parent bb22204365
commit 0b76beaff4

View file

@ -60,6 +60,9 @@ Exports the config to an image file using customized output options.`,
env.Init() env.Init()
defer env.Close() defer env.Close()
template.Init(env)
cfg := config.Load(env) cfg := config.Load(env)
// set sane defaults for things we don't print // set sane defaults for things we don't print
@ -73,8 +76,6 @@ Exports the config to an image file using customized output options.`,
terminal.BackgroundColor = cfg.TerminalBackground.ResolveTemplate() terminal.BackgroundColor = cfg.TerminalBackground.ResolveTemplate()
terminal.Colors = cfg.MakeColors() terminal.Colors = cfg.MakeColors()
template.Init(env)
eng := &prompt.Engine{ eng := &prompt.Engine{
Config: cfg, Config: cfg,
Env: env, Env: env,