Merge pull request #5047 from vvoland/v26.1-5038

[26.1 backport] cli-plugins: PluginRunCommand: use cmd.Environ instead of os.Environ
This commit is contained in:
Paweł Gronowski 2024-04-30 13:40:03 +02:00 committed by GitHub
commit 4cf5afaefa
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 1 additions and 2 deletions

View File

@ -240,8 +240,7 @@ func PluginRunCommand(dockerCli command.Cli, name string, rootcmd *cobra.Command
cmd.Stdout = os.Stdout
cmd.Stderr = os.Stderr
cmd.Env = os.Environ()
cmd.Env = append(cmd.Env, ReexecEnvvar+"="+os.Args[0])
cmd.Env = append(cmd.Environ(), ReexecEnvvar+"="+os.Args[0])
cmd.Env = appendPluginResourceAttributesEnvvar(cmd.Env, rootcmd, plugin)
return cmd, nil