Define the LANG variable when executing actions
This commit is contained in:
parent
ea1724e2ca
commit
37c951ef85
4 changed files with 24 additions and 6 deletions
|
|
@ -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)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue