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

pull/2240/head
Mitchell Hashimoto 11 years ago
parent fd4e0e9da4
commit d23f254b76

@ -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
}

Loading…
Cancel
Save