Skip to content

Feature Request: Emit error on early 7z process termination #105

@sysrage

Description

@sysrage

Currently, if the spawned 7-zip process is killed before extraction is complete, the 'end' event is emitted and no errors are shown. Since the extraction actually failed in this case, an 'error' event should be emitted instead.

If there's some technical reason this shouldn't be fixed, please update documentation to suggest that people implement their own error handling for this corner-case. Something like:

extractStream.on('end', () => {
  if (!extractStream.info.Compressed) {
    return reject(new Error('7za Process Terminated Early'));
  }
  resolve();
});

extractStream.on('error', (error) => {
  reject(error);
});

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