DockerCLI/cli-plugins/manager
Sebastiaan van Stijn 1c6a8ecf2e
cli-plugins: PluginRunCommand: use cmd.Environ instead of os.Environ
Commit 5011759056 implemented a fix that
caused the current environment to be discarded, using `os.Environ()`.
On Windows, `os.Environ()` may produce an incorrect value for `PWD`,
for which a new function was added in go1.19;

- https://tip.golang.org/doc/go1.19#osexecpkgosexec
- https://go-review.googlesource.com/c/go/+/401340

Replace the use of `os.Environ()` with `cmd.Environ()` to address that.

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
(cherry picked from commit 5ccb48459b)
Signed-off-by: Paweł Gronowski <pawel.gronowski@docker.com>
2024-04-30 13:03:15 +02:00
..
candidate.go remove uses of golang.org/x/sys/execabs 2023-05-26 02:03:45 +02:00
candidate_test.go linting: address else/if/elseif statements found by gocritic 2023-11-20 16:02:16 +01:00
cobra.go plugins: fix encoding for OTEL env var passed to plugin 2024-02-28 12:43:07 -08:00
error.go cli-plugins: Introduce support for hooks 2024-03-22 17:30:18 +00:00
error_test.go cli-plugins/manager: TestPluginError: don't use yaml.Marshal 2022-11-17 13:17:51 +01:00
hooks.go hooks: pass command execution error to plugins 2024-04-22 17:12:53 +01:00
hooks_test.go hooks: include full configured command 2024-04-22 13:16:26 +01:00
manager.go cli-plugins: PluginRunCommand: use cmd.Environ instead of os.Environ 2024-04-30 13:03:15 +02:00
manager_test.go cli-plugins/manager: getPluginDirs: take ConfigFile as argument 2024-01-11 18:15:30 +01:00
manager_unix.go Revert "plugins: run plugin with new process group ID" 2024-01-15 13:30:01 +00:00
manager_windows.go Revert "plugins: run plugin with new process group ID" 2024-01-15 13:30:01 +00:00
metadata.go cli-plugins: Introduce support for hooks 2024-03-22 17:30:18 +00:00
plugin.go hooks: pass command execution error to plugins 2024-04-22 17:12:53 +01:00
suffix_unix.go remove pre-go1.17 build-tags 2023-05-05 18:23:03 +02:00
suffix_windows.go Check for `.exe` case insensitively 2019-01-30 13:45:26 +00:00