post-processor/vagrant: check for error when tarring earlier

This commit is contained in:
Mitchell Hashimoto 2013-07-02 08:46:00 -07:00
parent 09f2fbf9f9
commit 857beb6167
1 changed files with 5 additions and 0 deletions

View File

@ -40,6 +40,11 @@ func DirToBox(dst, dir string) error {
// This is the walk func that tars each of the files in the dir
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
if info.IsDir() {
log.Printf("Skiping directory '%s' for box '%s'", path, dst)