Skip to content

Commit edd5d15

Browse files
committed
Don't fill the 'args' array when none passed
1 parent 7f3f9ae commit edd5d15

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

util/run.js

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -46,8 +46,10 @@ module.exports = function (command) {
4646
}
4747

4848
// Normalize pathes before passing them to 7-Zip.
49-
args[1] = path.normalize(args[1]);
50-
args[2] = path.normalize(args[2]);
49+
if (args.length > 1) {
50+
args[1] = path.normalize(args[1]);
51+
args[2] = path.normalize(args[2]);
52+
}
5153

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

0 commit comments

Comments
 (0)