Skip to content

Commit 20fe042

Browse files
authored
Merge pull request #6941 from afbjorklund/lz4-path
Check if lz4 is available before trying to use it
2 parents 39705bc + fea9fd3 commit 20fe042

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

pkg/minikube/cruntime/docker.go

+5
Original file line numberDiff line numberDiff line change
@@ -274,6 +274,11 @@ func (r *Docker) Preload(k8sVersion string) error {
274274
tarballPath := download.TarballPath(k8sVersion)
275275
dest := "/preloaded.tar.lz4"
276276

277+
c := exec.Command("which", "lz4")
278+
if _, err := r.Runner.RunCmd(c); err != nil {
279+
return errors.Wrapf(err, "check lz4 available.")
280+
}
281+
277282
// Copy over tarball into host
278283
fa, err := assets.NewFileAsset(tarballPath, filepath.Dir(dest), filepath.Base(dest), "0644")
279284
if err != nil {

0 commit comments

Comments
 (0)