mirror of
https://github.com/alibaba/anyproxy.git
synced 2025-05-22 15:38:26 +00:00
relative path
This commit is contained in:
parent
b173e481fd
commit
b247ba1b31
2
bin.js
2
bin.js
@ -32,7 +32,7 @@ if(program.clear){
|
|||||||
try{ //for abs path
|
try{ //for abs path
|
||||||
ruleModule = require(program.rule);
|
ruleModule = require(program.rule);
|
||||||
}catch(e){ //for relative path
|
}catch(e){ //for relative path
|
||||||
ruleModule = require("./" + program.rule);
|
ruleModule = require(process.cwd() + '/' + program.rule.replace(/^\.\//,''));
|
||||||
}
|
}
|
||||||
console.log(color.green("rule file loaded"));
|
console.log(color.green("rule file loaded"));
|
||||||
}else{
|
}else{
|
||||||
|
Loading…
x
Reference in New Issue
Block a user