Skip to content

[BUG] Sync list does not work #308

Description

@movitto

Listing of a tarball contents works in asynchronous mode, but when 'sync' is passed to tar.t, undefined is returned.

Fedora 33. nodejs v14.18.1. tar v1.32

The following works:

var entries = [];
await tar.t({
  file : 'mytarball.tgz',
  onentry : e => entries.push(e.header.path)
})
console.log(entries) # ['file1', 'file2', etc]

But the following does not work:

var entries = tar.t({
  file : 'mytarball.tgz',
  sync : true
})
console.log(entries) # undefined

Any insight as to why this is would be highly appreciated.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions