From 9d9471886964e36d351da423cfa8a42f630c3c88 Mon Sep 17 00:00:00 2001 From: Shishir Mahajan Date: Wed, 16 Sep 2020 13:48:28 -0700 Subject: [PATCH] Don't override $(PATH) environment variable. --- containerd/driver.go | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/containerd/driver.go b/containerd/driver.go index 72833ad..e62e48f 100644 --- a/containerd/driver.go +++ b/containerd/driver.go @@ -358,6 +358,10 @@ func (d *Driver) StartTask(cfg *drivers.TaskConfig) (*drivers.TaskHandle, *drive // Setup environment variables. var env []string for key, val := range cfg.Env { + // Don't override $PATH. + if key == "PATH" { + continue + } env = append(env, fmt.Sprintf("%s=%s", key, val)) }