Fix windows default path overwrite issue
Windows Containers have a default path already configured at bootup. WithDefaultPathEnv overwrites this with a unix path Signed-off-by: charitykathure <kathurecharity505@gmail.com>
This commit is contained in:
@@ -187,13 +187,6 @@ func WithEnv(environmentVariables []string) SpecOpts {
|
||||
}
|
||||
}
|
||||
|
||||
// WithDefaultPathEnv sets the $PATH environment variable to the
|
||||
// default PATH defined in this package.
|
||||
func WithDefaultPathEnv(_ context.Context, _ Client, _ *containers.Container, s *Spec) error {
|
||||
s.Process.Env = replaceOrAppendEnvValues(s.Process.Env, defaultUnixEnv)
|
||||
return nil
|
||||
}
|
||||
|
||||
// replaceOrAppendEnvValues returns the defaults with the overrides either
|
||||
// replaced by env key or appended to the list
|
||||
func replaceOrAppendEnvValues(defaults, overrides []string) []string {
|
||||
|
||||
Reference in New Issue
Block a user