From b247ba1b312fe1da6a69c8c6abb23c9a6fc5da5a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=83=B3=E5=BD=93=E5=BD=93?= Date: Sat, 6 Sep 2014 10:38:47 +0800 Subject: [PATCH] relative path --- bin.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/bin.js b/bin.js index ee46f15..6a8ef37 100644 --- a/bin.js +++ b/bin.js @@ -32,7 +32,7 @@ if(program.clear){ try{ //for abs path ruleModule = require(program.rule); }catch(e){ //for relative path - ruleModule = require("./" + program.rule); + ruleModule = require(process.cwd() + '/' + program.rule.replace(/^\.\//,'')); } console.log(color.green("rule file loaded")); }else{