Merge pull request #7095 from anish/comm_cleanup

Don't run StepCleanupTempKeys when communicator is set to none
This commit is contained in:
Adrien Delorme 2018-12-11 17:41:21 +01:00 committed by GitHub
commit 82fb7aac5e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 4 additions and 0 deletions

View File

@ -19,6 +19,10 @@ func (s *StepCleanupTempKeys) Run(_ context.Context, state multistep.StateBag) m
// so there's no realistic situation where these keys can cause issues.
// However, it's nice to clean up after yourself.
if s.Comm.Type == "none" {
return multistep.ActionContinue
}
comm := state.Get("communicator").(packer.Communicator)
ui := state.Get("ui").(packer.Ui)