1
0
mirror of synced 2025-12-22 23:17:59 +08:00

fix issue #16, normalize path

This commit is contained in:
Zach Carter
2012-04-05 22:13:44 -04:00
parent 4c65154163
commit 5cca03512e

View File

@@ -66,7 +66,7 @@ function parse (source) {
function main (args) {
var source = '';
if (options.file) {
var path = require('path').join(process.cwd(), options.file);
var path = require('path').normalize(options.file);
source = parse(fs.readFileSync(path, "utf8"));
if (options.inplace) {
fs.writeSync(fs.openSync(path,'w+'), source, 0, "utf8");