mirror of
				https://github.com/optim-enterprises-bv/kubernetes.git
				synced 2025-11-03 19:58:17 +00:00 
			
		
		
		
	Parse ENV vars to crictl command
This commit is contained in:
		@@ -17,6 +17,7 @@ limitations under the License.
 | 
				
			|||||||
package runtime
 | 
					package runtime
 | 
				
			||||||
 | 
					
 | 
				
			||||||
import (
 | 
					import (
 | 
				
			||||||
 | 
						"os"
 | 
				
			||||||
	"strings"
 | 
						"strings"
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	"github.com/pkg/errors"
 | 
						"github.com/pkg/errors"
 | 
				
			||||||
@@ -68,7 +69,9 @@ func (runtime *CRIRuntime) Socket() string {
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
// crictl creates a crictl command for the provided args.
 | 
					// crictl creates a crictl command for the provided args.
 | 
				
			||||||
func (runtime *CRIRuntime) crictl(args ...string) utilsexec.Cmd {
 | 
					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
 | 
					// IsRunning checks if runtime is running
 | 
				
			||||||
 
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user