Skip to content

Commit

Permalink
Fixes #200, colorscheme in config file causes error.
Browse files Browse the repository at this point in the history
  • Loading branch information
xxxserxxx committed Feb 8, 2022
1 parent 0f9c74e commit e01db2c
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions cmd/gotop/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down

0 comments on commit e01db2c

Please sign in to comment.