mirror of
https://github.com/alibaba/anyproxy.git
synced 2025-04-23 23:31:26 +00:00
bugfix for path.join
This commit is contained in:
parent
ce454e6ad4
commit
aafdb62193
3
bin.js
3
bin.js
@ -46,12 +46,13 @@ if(program.clear){
|
||||
var ruleModule;
|
||||
|
||||
if(program.rule){
|
||||
var ruleFilePath = path.join(process.cwd(),program.rule);
|
||||
var ruleFilePath = path.resolve(process.cwd(),program.rule);
|
||||
try{
|
||||
if(fs.existsSync(ruleFilePath)){
|
||||
ruleModule = require(ruleFilePath);
|
||||
console.log("rule file loaded :" + ruleFilePath);
|
||||
}else{
|
||||
console.log(ruleFilePath);
|
||||
console.log(color.red("can not find rule file"));
|
||||
}
|
||||
}catch(e){
|
||||
|
Loading…
x
Reference in New Issue
Block a user