Merge pull request #8265 from alrs/fix-common-iso-config-err

common: collect dropped error
This commit is contained in:
Megan Marsh 2019-10-23 15:09:09 -07:00 committed by GitHub
commit ce248c9df4
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 4 additions and 0 deletions

View File

@ -162,6 +162,10 @@ func (c *ISOConfig) Prepare(ctx *interpolate.Context) (warnings []string, errs [
}
if c.ISOChecksumType == "file" {
u, err := url.Parse(c.ISOUrls[0])
if err != nil {
errs = append(errs, fmt.Errorf("error parsing URL <%s>: %s",
c.ISOUrls[0], err))
}
wd, err := os.Getwd()
if err != nil {
log.Printf("get working directory: %v", err)