Minor cleanup and style fix.

This commit is contained in:
Jasper Siepkes 2016-12-29 18:58:56 +01:00
parent 0c9b576c05
commit 690302a6a3
2 changed files with 3 additions and 10 deletions

View File

@ -49,6 +49,7 @@ func (b *Builder) Run(ui packer.Ui, hook packer.Hook, cache packer.Cache) (packe
state := new(multistep.BasicStateBag)
state.Put("config", b.config)
state.Put("debug", b.config.PackerDebug)
state.Put("driver", driver)
state.Put("hook", hook)
state.Put("ui", ui)
@ -70,15 +71,7 @@ func (b *Builder) Run(ui packer.Ui, hook packer.Hook, cache packer.Cache) (packe
&StepDeleteMachine{},
}
if b.config.PackerDebug {
b.runner = &multistep.DebugRunner{
Steps: steps,
PauseFn: common.MultistepDebugFn(ui),
}
} else {
b.runner = &multistep.BasicRunner{Steps: steps}
}
b.runner = common.NewRunnerWithPauseFn(steps, b.config.PackerConfig, ui, state)
b.runner.Run(state)
// If there was an error, return that

View File

@ -85,4 +85,4 @@ func sshConfig(useAgent bool, username, privateKeyPath, password string) func(mu
}}, nil
}
}
}
}