diff --git a/Jade.lrplugin/jade_compiler.js b/Jade.lrplugin/jade_compiler.js index 05fba4d6..88bcbc54 100755 --- a/Jade.lrplugin/jade_compiler.js +++ b/Jade.lrplugin/jade_compiler.js @@ -41,8 +41,8 @@ var usage = '' var arg , infile , outfile; -while (args.length) { - arg = args.shift(); +for(var i=0; i (args.length-2)) { + console.error('exactly 2 file names must be specified'); + process.exit(1); + } + infile = args[i]; + outfile = args[++i]; break; } - if (args.length != 2) { - console.error('exactly 2 file names must be specified'); - process.exit(1); - } - infile = args.shift(); - outfile = args.shift(); } renderJade(infile, outfile);