Fix the image cache delete
parent
8f91c37bba
commit
50dcda4ba9
|
|
@ -17,7 +17,6 @@ limitations under the License.
|
|||
package machine
|
||||
|
||||
import (
|
||||
"golang.org/x/sync/errgroup"
|
||||
"io/ioutil"
|
||||
"os"
|
||||
"os/exec"
|
||||
|
|
@ -25,6 +24,8 @@ import (
|
|||
"runtime"
|
||||
"strings"
|
||||
|
||||
"golang.org/x/sync/errgroup"
|
||||
|
||||
"k8s.io/minikube/pkg/minikube/assets"
|
||||
"k8s.io/minikube/pkg/minikube/bootstrapper"
|
||||
"k8s.io/minikube/pkg/minikube/config"
|
||||
|
|
@ -223,6 +224,7 @@ func LoadFromCacheBlocking(cmd bootstrapper.CommandRunner, src string) error {
|
|||
func DeleteFromImageCacheDir(images []string) error {
|
||||
for _, image := range images {
|
||||
path := filepath.Join(constants.ImageCacheDir, image)
|
||||
path = sanitizeCacheDir(path)
|
||||
glog.Infoln("Deleting image in cache at ", path)
|
||||
if err := os.Remove(path); err != nil {
|
||||
return err
|
||||
|
|
|
|||
Loading…
Reference in New Issue