fix(config): print error correctly in eval

This commit is contained in:
Jan De Dobbeleer 2022-03-17 17:38:56 +01:00 committed by Jan De Dobbeleer
parent c8068b9cb1
commit f0c5ace9b5

View file

@ -76,6 +76,10 @@ func (cfg *Config) exitWithError(err error) {
}
defer os.Exit(1)
message := "Oh My Posh Error:\n\n" + err.Error()
if cfg.eval {
fmt.Printf("echo \"%s\"\n", message)
return
}
cfg.print(message)
}