Skip to content

Commit

Permalink
better to just log error instead of throwing error and stopping the e…
Browse files Browse the repository at this point in the history
…xtraction, tested a few time and everything is extracted as expected.
  • Loading branch information
TheTechsTech committed Jan 23, 2018
1 parent dee8495 commit 52b5580
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions lib/extract.js
Original file line number Diff line number Diff line change
Expand Up @@ -31,9 +31,16 @@ module.exports = function (archive, dest, optionspath, options) {
// When a stdout is emitted, parse each line and search for a pattern. When
// the pattern is found, extract the file (or directory) name from it and
// pass it to an array. Finally returns this array.
// Also check if a file is extracted using an Unsupported Method of 7-Zip.
.progress(function (data) {

var entries = [];
var isUnsupportedMethod = (data.search('Unsupported Method'))
? true
: false;
if (isUnsupportedMethod) {
console.error(new Error('Unsupported Method'));
}

data.split('\n').forEach(function (line) {
if (line.substr(0, 12) === 'Extracting ') {
Expand Down

0 comments on commit 52b5580

Please sign in to comment.