From dda89185fb25f294b40955c4486ca53b6ffe058a Mon Sep 17 00:00:00 2001 From: Nicola Murino Date: Tue, 5 Nov 2024 18:06:58 +0100 Subject: [PATCH] plugins: fix passing additional environment variables Signed-off-by: Nicola Murino --- internal/plugin/plugin.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/internal/plugin/plugin.go b/internal/plugin/plugin.go index 62dceaed..d36f0926 100644 --- a/internal/plugin/plugin.go +++ b/internal/plugin/plugin.go @@ -143,7 +143,7 @@ func (c *Config) getCommand() *exec.Cmd { } logger.Debug(logSender, "", "additional env vars for plugin %q: %+v", c.Cmd, c.EnvVars) for _, key := range c.EnvVars { - cmd.Env = append(cmd.Env, os.Getenv(key)) + cmd.Env = append(cmd.Env, fmt.Sprintf("%s=%s", key, os.Getenv(key))) } return cmd }