fix issue #16, normalize path
This commit is contained in:
@@ -66,7 +66,7 @@ function parse (source) {
|
|||||||
function main (args) {
|
function main (args) {
|
||||||
var source = '';
|
var source = '';
|
||||||
if (options.file) {
|
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"));
|
source = parse(fs.readFileSync(path, "utf8"));
|
||||||
if (options.inplace) {
|
if (options.inplace) {
|
||||||
fs.writeSync(fs.openSync(path,'w+'), source, 0, "utf8");
|
fs.writeSync(fs.openSync(path,'w+'), source, 0, "utf8");
|
||||||
|
|||||||
Reference in New Issue
Block a user