diff --git a/ignite/pkg/archive/tar_gz.go b/ignite/pkg/archive/tar_gz.go index 273bf039af..38ec3fbd90 100644 --- a/ignite/pkg/archive/tar_gz.go +++ b/ignite/pkg/archive/tar_gz.go @@ -20,12 +20,9 @@ func CreateArchive(dir string, buf io.Writer) error { tw := tar.NewWriter(gw) defer tw.Close() - // Iterate over files from directory and add them to the tar archive - filepath.WalkDir(dir, func(path string, info os.DirEntry, err error) error { + return filepath.WalkDir(dir, func(path string, info os.DirEntry, err error) error { return addToArchive(tw, path) }) - - return nil } func addToArchive(tw *tar.Writer, filename string) error {