undo portions of general stupidity I have done.
This commit is contained in:
parent
f301a6454d
commit
839f051d93
|
@ -4,10 +4,9 @@ package common
|
||||||
// are sent by packer, properly tagged already so mapstructure can load
|
// are sent by packer, properly tagged already so mapstructure can load
|
||||||
// them. Embed this structure into your configuration class to get it.
|
// them. Embed this structure into your configuration class to get it.
|
||||||
type PackerConfig struct {
|
type PackerConfig struct {
|
||||||
PackerBuildName string `mapstructure:"packer_build_name"`
|
PackerBuildName string `mapstructure:"packer_build_name"`
|
||||||
PackerBuilderType string `mapstructure:"packer_builder_type"`
|
PackerBuilderType string `mapstructure:"packer_builder_type"`
|
||||||
PackerDebug bool `mapstructure:"packer_debug"`
|
PackerDebug bool `mapstructure:"packer_debug"`
|
||||||
PackerForce bool `mapstructure:"packer_force"`
|
PackerForce bool `mapstructure:"packer_force"`
|
||||||
PackerUserVars map[string]string `mapstructure:"packer_user_variables"`
|
PackerUserVars map[string]string `mapstructure:"packer_user_variables"`
|
||||||
PackerIsoTargetPath string `mapstructure:"packer_iso_target_path"`
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -71,7 +71,7 @@ func (s *StepDownload) Run(state multistep.StateBag) multistep.StepAction {
|
||||||
// if we force a certain extension we hash the URL and add
|
// if we force a certain extension we hash the URL and add
|
||||||
// the extension to force it.
|
// the extension to force it.
|
||||||
cacheKey := url
|
cacheKey := url
|
||||||
if s.Extension != "" { //HERE.
|
if s.Extension != "" {
|
||||||
hash := sha1.Sum([]byte(url))
|
hash := sha1.Sum([]byte(url))
|
||||||
cacheKey = fmt.Sprintf(
|
cacheKey = fmt.Sprintf(
|
||||||
"%s.%s", hex.EncodeToString(hash[:]), s.Extension)
|
"%s.%s", hex.EncodeToString(hash[:]), s.Extension)
|
||||||
|
|
Loading…
Reference in New Issue