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
|
@ -95,7 +95,13 @@ func declareActionsRoutes(cfg *config.Config, router *gin.RouterGroup) {
|
|||
actionsRoutes.POST("/run", func(c *gin.Context) {
|
||||
action := c.MustGet("action").(*reveil.Action)
|
||||
|
||||
cmd, err := action.Launch()
|
||||
settings, err := reveil.ReadSettings(cfg.SettingsFile)
|
||||
if err != nil {
|
||||
c.AbortWithStatusJSON(http.StatusInternalServerError, gin.H{"errmsg": fmt.Sprintf("Unable to run the action: unable to read settings: %s", err.Error())})
|
||||
return
|
||||
}
|
||||
|
||||
cmd, err := action.Launch(settings)
|
||||
if err != nil {
|
||||
c.AbortWithStatusJSON(http.StatusInternalServerError, gin.H{"errmsg": fmt.Sprintf("Unable to run the action: %s", err.Error())})
|
||||
return
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue