Fixes #200, colorscheme in config file causes error.

This commit is contained in:
Sean E. Russell 2022-02-08 11:50:52 -06:00
parent 0f9c74eb08
commit e01db2c144

View File

@ -101,11 +101,13 @@ func parseArgs() error {
opflag.Usage()
os.Exit(0)
}
cs, err := colorschemes.FromName(conf.ConfigDir, *color)
if err != nil {
return err
if *color != "" {
cs, err := colorschemes.FromName(conf.ConfigDir, *color)
if err != nil {
return err
}
conf.Colorscheme = cs
}
conf.Colorscheme = cs
if *fahrenheit {
conf.TempScale = 'F'
} else {