fix(engine): close Env after prompt generation

relates to #3244
This commit is contained in:
Jan De Dobbeleer 2022-12-25 20:51:28 +01:00 committed by Jan De Dobbeleer
parent be803c838b
commit 9dd462c0d0
2 changed files with 1 additions and 1 deletions

View file

@ -59,6 +59,7 @@ var printCmd = &cobra.Command{
}
eng := engine.New(flags)
defer eng.Env.Close()
switch args[0] {
case "debug":

View file

@ -16,7 +16,6 @@ func New(flags *platform.Flags) *Engine {
}
env.Init()
defer env.Close()
cfg := LoadConfig(env)
ansi := &color.Ansi{}
ansi.Init(env.Shell())