fix(image): initialize image CLI correctly

This commit is contained in:
Jan De Dobbeleer 2024-11-04 13:17:51 +01:00
parent 6a8cecb73b
commit 4deae77661

View file

@ -8,6 +8,7 @@ import (
"github.com/jandedobbeleer/oh-my-posh/src/prompt"
"github.com/jandedobbeleer/oh-my-posh/src/runtime"
"github.com/jandedobbeleer/oh-my-posh/src/shell"
"github.com/jandedobbeleer/oh-my-posh/src/template"
"github.com/jandedobbeleer/oh-my-posh/src/terminal"
"github.com/spf13/cobra"
@ -72,6 +73,8 @@ Exports the config to an image file using customized output options.`,
terminal.BackgroundColor = cfg.TerminalBackground.ResolveTemplate()
terminal.Colors = cfg.MakeColors()
template.Init(env)
eng := &prompt.Engine{
Config: cfg,
Env: env,