From 992dd1427282b81b3da5fa58aa730b8f25843292 Mon Sep 17 00:00:00 2001 From: Shane C Date: Tue, 9 Jul 2024 17:45:33 -0400 Subject: [PATCH] add env options --- linux/run.go | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/linux/run.go b/linux/run.go index 308d28e..e890eb7 100644 --- a/linux/run.go +++ b/linux/run.go @@ -69,6 +69,10 @@ func (cmd *LinuxCommand) Run() error { command := exec.Command(cmd.Options.Shell, "-c", sourceCommand.String()+cmd.Options.Command+commandOptions.String()) command.Dir = cmd.Options.Cwd + for key, value := range cmd.Options.Env { + command.Env = append(command.Env, fmt.Sprintf("%s=%s", key, value)) + } + var signalChannel chan os.Signal if len(cmd.handlers) != 0 {