From 9e857463fcba543123f8babac3e56d1f1093a8d4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E8=B5=AB=E9=97=A8?= Date: Fri, 20 Feb 2015 00:53:18 +0800 Subject: [PATCH] bugfix, require 'absolute ruleFilePath' instead of 'relative rule option'; --- bin.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/bin.js b/bin.js index 86ccdee..2b3f8da 100644 --- a/bin.js +++ b/bin.js @@ -37,7 +37,7 @@ if(program.clear){ var ruleFilePath = path.join(process.cwd(),program.rule); try{ if(fs.existsSync(ruleFilePath)){ - ruleModule = require(program.rule); + ruleModule = require(ruleFilePath); console.log("rule file loaded :" + ruleFilePath); }else{ console.log(color.red("can not find rule file")); @@ -54,7 +54,7 @@ if(program.clear){ dbFile : program.file, throttle : program.throttle, rule : ruleModule, - disableWebInterface : false, + disableWebInterface : false, interceptHttps : program.intercept }); -} \ No newline at end of file +}