builder/amazon: don't get password if platform not set on image

This commit is contained in:
Mitchell Hashimoto 2015-06-13 22:39:19 -07:00
parent fd4e0e9da4
commit d23f254b76
1 changed files with 1 additions and 1 deletions

View File

@ -28,7 +28,7 @@ func (s *StepGetPassword) Run(state multistep.StateBag) multistep.StepAction {
image := state.Get("source_image").(*ec2.Image)
// Skip if we're not Windows...
if *image.Platform != "windows" {
if image.Platform == nil || *image.Platform != "windows" {
log.Printf("[INFO] Not Windows, skipping get password...")
return multistep.ActionContinue
}