From 8d7dfeef25259af14d8c8fd010e27a353192a5aa Mon Sep 17 00:00:00 2001 From: wh1te909 Date: Tue, 29 Nov 2022 19:50:52 +0000 Subject: [PATCH] fix unix --- agent/agent_unix.go | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/agent/agent_unix.go b/agent/agent_unix.go index a3b06f1..b3af98e 100644 --- a/agent/agent_unix.go +++ b/agent/agent_unix.go @@ -163,7 +163,7 @@ func NewAgentConfig() *rmm.AgentConfig { return ret } -func (a *Agent) RunScript(code string, shell string, args []string, timeout int, runasuser bool) (stdout, stderr string, exitcode int, e error) { +func (a *Agent) RunScript(code string, shell string, args []string, timeout int, runasuser bool, envVars []string) (stdout, stderr string, exitcode int, e error) { code = removeWinNewLines(code) content := []byte(code) @@ -193,6 +193,7 @@ func (a *Agent) RunScript(code string, shell string, args []string, timeout int, opts.IsScript = true opts.Shell = f.Name() opts.Args = args + opts.EnvVars = envVars opts.Timeout = time.Duration(timeout) out := a.CmdV2(opts) retError := ""