Check HTTP Response status when trying to download minikube.iso
Check the response so that we don't actually download an error page or something other than the ISO we're looking for.pull/472/head
parent
24a20d643e
commit
39a6b586da
|
@ -308,6 +308,8 @@ func (m *MachineConfig) CacheMinikubeISOFromURL() error {
|
|||
response, err := http.Get(m.MinikubeISO)
|
||||
if err != nil {
|
||||
return err
|
||||
} else if response.StatusCode != http.StatusOK {
|
||||
return fmt.Errorf("Received %d response from %s while trying to download minikube.iso", response.StatusCode, m.MinikubeISO)
|
||||
} else {
|
||||
out, err := os.Create(m.GetISOCacheFilepath())
|
||||
if err != nil {
|
||||
|
|
Loading…
Reference in New Issue