Skip to content

Commit

Permalink
Don't fill the 'args' array when none passed
Browse files Browse the repository at this point in the history
  • Loading branch information
q2s2t committed Oct 23, 2014
1 parent 7f3f9ae commit edd5d15
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions util/run.js
Original file line number Diff line number Diff line change
Expand Up @@ -46,8 +46,10 @@ module.exports = function (command) {
}

// Normalize pathes before passing them to 7-Zip.
args[1] = path.normalize(args[1]);
args[2] = path.normalize(args[2]);
if (args.length > 1) {
args[1] = path.normalize(args[1]);
args[2] = path.normalize(args[2]);
}

// When an stdout is emitted, parse it. If an error is detected in the body
// of the stdout create an new error with the 7-Zip error message as the
Expand Down

0 comments on commit edd5d15

Please sign in to comment.