1
0
Fork 0
mirror of https://github.com/Luzifer/streamdeck.git synced 2024-10-18 13:04:25 +00:00

Fix: Execute command with parent env

Signed-off-by: Knut Ahlers <knut@ahlers.me>
This commit is contained in:
Knut Ahlers 2019-11-21 18:47:40 +01:00
parent 9ed2e81404
commit dcf7241ca5
Signed by: luzifer
GPG key ID: DC2729FDD34BE99E

View file

@ -1,6 +1,7 @@
package main package main
import ( import (
"os"
"os/exec" "os/exec"
"github.com/pkg/errors" "github.com/pkg/errors"
@ -28,6 +29,8 @@ func (actionExec) Execute(attributes map[string]interface{}) error {
} }
command := exec.Command(args[0], args[1:]...) command := exec.Command(args[0], args[1:]...)
command.Env = os.Environ()
if err := command.Start(); err != nil { if err := command.Start(); err != nil {
return errors.Wrap(err, "Unable to start command") return errors.Wrap(err, "Unable to start command")
} }