Don't show download message until downloading

For instance if the boot image already exists
pull/6953/head
Anders F Björklund 2020-03-08 17:41:25 +01:00
parent e6ba335e9c
commit 9e72a2ad9c
1 changed files with 2 additions and 1 deletions

View File

@ -79,7 +79,6 @@ func localISOPath(u *url.URL) string {
// ISO downloads and returns the path to the downloaded ISO
func ISO(urls []string, skipChecksum bool) (string, error) {
out.T(out.ISODownload, "Downloading VM boot image ...")
errs := map[string]string{}
for _, url := range urls {
@ -128,6 +127,8 @@ func downloadISO(isoURL string, skipChecksum bool) error {
return nil
}
out.T(out.ISODownload, "Downloading VM boot image ...")
urlWithChecksum := isoURL + "?checksum=file:" + isoURL + ".sha256"
if skipChecksum {
urlWithChecksum = isoURL