Skip to content

Commit

Permalink
commands: Fix case where languages cannot be configured
Browse files Browse the repository at this point in the history
There are some commands that needs to complete without a complete configuration.
  • Loading branch information
bep committed May 27, 2022
1 parent 52edea0 commit 653ab2c
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions commands/commandeer.go
Expand Up @@ -369,12 +369,13 @@ func (c *commandeer) loadConfig() error {
c.configFiles = configFiles

var ok bool
loc := time.Local
c.languages, ok = c.Cfg.Get("languagesSorted").(langs.Languages)
if !ok {
panic("languages not configured")
if ok {
loc = langs.GetLocation(c.languages[0])
}

err = c.initClock(langs.GetLocation(c.languages[0]))
err = c.initClock(loc)
if err != nil {
return err
}
Expand Down

0 comments on commit 653ab2c

Please sign in to comment.