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:
parent
9ed2e81404
commit
dcf7241ca5
1 changed files with 3 additions and 0 deletions
|
@ -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")
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue