post-processor/vagrant: check for error when tarring earlier
This commit is contained in:
parent
dbbbc38af6
commit
8ece9a60d5
|
@ -40,6 +40,11 @@ func DirToBox(dst, dir string) error {
|
||||||
|
|
||||||
// This is the walk func that tars each of the files in the dir
|
// This is the walk func that tars each of the files in the dir
|
||||||
tarWalk := func(path string, info os.FileInfo, prevErr error) error {
|
tarWalk := func(path string, info os.FileInfo, prevErr error) error {
|
||||||
|
// If there was a prior error, return it
|
||||||
|
if prevErr != nil {
|
||||||
|
return prevErr
|
||||||
|
}
|
||||||
|
|
||||||
// Skip directories
|
// Skip directories
|
||||||
if info.IsDir() {
|
if info.IsDir() {
|
||||||
log.Printf("Skiping directory '%s' for box '%s'", path, dst)
|
log.Printf("Skiping directory '%s' for box '%s'", path, dst)
|
||||||
|
|
Loading…
Reference in New Issue