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.
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:
But the following does not work:
Any insight as to why this is would be highly appreciated.