Skip to content

Commit

Permalink
Parse ENV vars to crictl command
Browse files Browse the repository at this point in the history
  • Loading branch information
Manish Kumar committed May 19, 2022
1 parent b215a89 commit 58cc7e7
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion cmd/kubeadm/app/util/runtime/runtime.go
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ limitations under the License.
package runtime

import (
"os"
"strings"

"github.com/pkg/errors"
Expand Down Expand Up @@ -68,7 +69,9 @@ func (runtime *CRIRuntime) Socket() string {

// crictl creates a crictl command for the provided args.
func (runtime *CRIRuntime) crictl(args ...string) utilsexec.Cmd {
return runtime.exec.Command(runtime.crictlPath, append([]string{"-r", runtime.Socket()}, args...)...)
cmd := runtime.exec.Command(runtime.crictlPath, append([]string{"-r", runtime.Socket()}, args...)...)
cmd.SetEnv(os.Environ())
return cmd
}

// IsRunning checks if runtime is running
Expand Down

0 comments on commit 58cc7e7

Please sign in to comment.