Skip to content

Commit

Permalink
Merge pull request #6941 from afbjorklund/lz4-path
Browse files Browse the repository at this point in the history
Check if lz4 is available before trying to use it
  • Loading branch information
medyagh authored Mar 8, 2020
2 parents 39705bc + fea9fd3 commit 20fe042
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 20fe042

Please sign in to comment.