From dcf7241ca584df10bd661e38882d772fb3069328 Mon Sep 17 00:00:00 2001 From: Knut Ahlers Date: Thu, 21 Nov 2019 18:47:40 +0100 Subject: [PATCH] Fix: Execute command with parent env Signed-off-by: Knut Ahlers --- cmd/streamdeck/action_exec.go | 3 +++ 1 file changed, 3 insertions(+) diff --git a/cmd/streamdeck/action_exec.go b/cmd/streamdeck/action_exec.go index 8412d44..42b1a58 100644 --- a/cmd/streamdeck/action_exec.go +++ b/cmd/streamdeck/action_exec.go @@ -1,6 +1,7 @@ package main import ( + "os" "os/exec" "github.com/pkg/errors" @@ -28,6 +29,8 @@ func (actionExec) Execute(attributes map[string]interface{}) error { } command := exec.Command(args[0], args[1:]...) + command.Env = os.Environ() + if err := command.Start(); err != nil { return errors.Wrap(err, "Unable to start command") }