Skip to content

Commit

Permalink
Check if lz4 is available before trying to use it
Browse files Browse the repository at this point in the history
  • Loading branch information
afbjorklund committed Mar 7, 2020
1 parent e6ba335 commit fea9fd3
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions pkg/minikube/cruntime/docker.go
Original file line number Diff line number Diff line change
Expand Up @@ -274,6 +274,11 @@ func (r *Docker) Preload(k8sVersion string) error {
tarballPath := download.TarballPath(k8sVersion)
dest := "/preloaded.tar.lz4"

c := exec.Command("which", "lz4")
if _, err := r.Runner.RunCmd(c); err != nil {
return errors.Wrapf(err, "check lz4 available.")
}

// Copy over tarball into host
fa, err := assets.NewFileAsset(tarballPath, filepath.Dir(dest), filepath.Base(dest), "0644")
if err != nil {
Expand Down

0 comments on commit fea9fd3

Please sign in to comment.