From 690302a6a3f42658e5d2e8bc92ecf7027c212bfe Mon Sep 17 00:00:00 2001 From: Jasper Siepkes Date: Thu, 29 Dec 2016 18:58:56 +0100 Subject: [PATCH] Minor cleanup and style fix. --- builder/triton/builder.go | 11 ++--------- builder/triton/ssh.go | 2 +- 2 files changed, 3 insertions(+), 10 deletions(-) diff --git a/builder/triton/builder.go b/builder/triton/builder.go index b8195fc1c..3c9f3e856 100644 --- a/builder/triton/builder.go +++ b/builder/triton/builder.go @@ -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 diff --git a/builder/triton/ssh.go b/builder/triton/ssh.go index ccaceffb7..084ad8909 100644 --- a/builder/triton/ssh.go +++ b/builder/triton/ssh.go @@ -85,4 +85,4 @@ func sshConfig(useAgent bool, username, privateKeyPath, password string) func(mu }}, nil } } -} \ No newline at end of file +}