feature: add chroot build cancel function implementation

This commit is contained in:
Marin Salinas 2019-02-15 11:45:19 -06:00 committed by Megan Marsh
parent 30d5b1f7c2
commit 0d5ce8b9b9
1 changed files with 5 additions and 0 deletions

View File

@ -6,6 +6,7 @@ package chroot
import (
"errors"
"log"
"runtime"
osccommon "github.com/hashicorp/packer/builder/osc/common"
@ -68,4 +69,8 @@ func (b *Builder) Run(ui packer.Ui, hook packer.Hook, cache packer.Cache) (packe
}
func (b *Builder) Cancel() {
if b.runner != nil {
log.Println("Cancelling the step runner...")
b.runner.Cancel()
}
}