Merge pull request #9320 from hashicorp/fix_checksum_fixer
actually run the fixer
This commit is contained in:
commit
37df64873f
@ -50,6 +50,7 @@ func init() {
|
|||||||
"ssh-wait-timeout": new(FixerSSHTimout),
|
"ssh-wait-timeout": new(FixerSSHTimout),
|
||||||
"docker-tag-tags": new(FixerDockerTagtoTags),
|
"docker-tag-tags": new(FixerDockerTagtoTags),
|
||||||
"vsphere-iso-net-disk": new(FixerVSphereNetworkDisk),
|
"vsphere-iso-net-disk": new(FixerVSphereNetworkDisk),
|
||||||
|
"iso-checksum-type-and-url": new(FixerISOChecksumTypeAndURL),
|
||||||
}
|
}
|
||||||
|
|
||||||
FixerOrder = []string{
|
FixerOrder = []string{
|
||||||
@ -83,5 +84,6 @@ func init() {
|
|||||||
"comm-config",
|
"comm-config",
|
||||||
"ssh-wait-timeout",
|
"ssh-wait-timeout",
|
||||||
"vsphere-iso-net-disk",
|
"vsphere-iso-net-disk",
|
||||||
|
"iso-checksum-type-and-url",
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -27,7 +27,9 @@ func (FixerISOChecksumTypeAndURL) Fix(input map[string]interface{}) (map[string]
|
|||||||
checksum := stringValue(builder["iso_checksum"])
|
checksum := stringValue(builder["iso_checksum"])
|
||||||
delete(builder, "iso_checksum_url")
|
delete(builder, "iso_checksum_url")
|
||||||
delete(builder, "iso_checksum_type")
|
delete(builder, "iso_checksum_type")
|
||||||
|
if checksum == "" && checksumUrl == "" {
|
||||||
|
continue
|
||||||
|
}
|
||||||
if checksumUrl != "" {
|
if checksumUrl != "" {
|
||||||
checksum = "file:" + checksumUrl
|
checksum = "file:" + checksumUrl
|
||||||
} else if checksumType != "" {
|
} else if checksumType != "" {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user