Define the LANG variable when executing actions
All checks were successful
continuous-integration/drone/push Build is passing
continuous-integration/drone/tag Build is passing

This commit is contained in:
nemunaire 2023-11-04 10:04:29 +01:00
commit 37c951ef85
4 changed files with 24 additions and 6 deletions

View file

@ -120,8 +120,13 @@ func NewPlayer(cfg *config.Config, routines []reveil.Identifier) (*Player, error
return &p, nil
}
func (p *Player) launchAction(a *reveil.Action) (err error) {
p.currentCmd, err = a.Launch()
func (p *Player) launchAction(cfg *config.Config, a *reveil.Action) (err error) {
settings, err := reveil.ReadSettings(cfg.SettingsFile)
if err != nil {
return fmt.Errorf("unable to read settings: %w", err)
}
p.currentCmd, err = a.Launch(settings)
log.Println("Running action ", a.Name)
err = p.currentCmd.Wait()
@ -177,7 +182,7 @@ loop:
log.Println("weather time!")
p.dontUpdateVolume = true
p.hasSpokeWeather = true
go p.launchAction(p.weatherAction)
go p.launchAction(cfg, p.weatherAction)
} else {
p.dontUpdateVolume = false
p.volume = uint16(math.Log(1+float64(p.ntick)/8) * 9500)