From de213ceec0f5f85a9a5ea75143284ceffbf3da4e Mon Sep 17 00:00:00 2001 From: Christopher Jeffrey Date: Tue, 30 Jun 2015 00:23:15 -0700 Subject: [PATCH] minor --- test/widget-png.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/test/widget-png.js b/test/widget-png.js index 3dfabe2..e02459f 100644 --- a/test/widget-png.js +++ b/test/widget-png.js @@ -4,10 +4,10 @@ var fs = require('fs'); var argv = {}; process.argv = process.argv.map(function(arg, i) { - if (~arg.indexOf('=')) { + if (/^--\w+=/.test(arg)) { arg = arg.split('='); if (/^[0-9.]+$/.test(arg[1])) arg[1] = +arg[1]; - argv[arg[0].replace(/^-+/, '')] = arg[1]; + argv[arg[0].replace(/^--/, '')] = arg[1]; return; } if (arg.indexOf('--') === 0) {