Closed snnn closed 11 years ago
在bash 4.2不能重现。
当前generate.sh
使用的是/bin/sh
,明确指定使用bin/bash
可能解决该问题。
您也可以尝试直接用使用下列的命令:
node minifier.js > rules.json
node formatter.js rules.json > route_table
node evaluator.js rules.json
rm -f rules.json
另外目录中routes
的内容与./generate.sh route_table
生成的route_table
是一致的。
$ ./generate.sh route_table Total: 1112 rules
events.js:71 throw arguments[1]; // Unhandled 'error' event ^ Error: write EOF at errnoException (net.js:770:11) at Object.afterWrite (net.js:594:19)
undefined:0
^ SyntaxError: Unexpected end of input at Object.parse (native) at Object.getRulesFromInput (D:\os\bestroutetb\lib.js:219:19) at Object. (D:\os\bestroutetb\evaluator.js:9:5)
at Module._compile (module.js:449:26)
at Object.Module._extensions..js (module.js:467:10)
at Module.load (module.js:356:32)
at Function.Module._load (module.js:312:12)
at Module.runMain (module.js:492:10)
at process.startup.processNextTick.process._tickCallback (node.js:244:9)
code取自最新的trunk。 svn co https://github.com/ashi009/bestroutetb/trunk -r 61