1
0
mirror of synced 2025-12-18 04:24:06 +08:00

Merge branch 'fix-inplace-overwriting' into add-forceformat-option

* fix-inplace-overwriting:
  Fixing variable name when overwriting input file.
This commit is contained in:
Lance Roggendorff
2012-09-12 23:12:25 -05:00

View File

@@ -135,7 +135,7 @@ function main (args) {
var json = path.normalize(options.file);
source = parse(fs.readFileSync(json, "utf8"));
if (options.inplace) {
fs.writeSync(fs.openSync(path,'w+'), source, 0, "utf8");
fs.writeSync(fs.openSync(json,'w+'), source, 0, "utf8");
} else {
if (! options.quiet) { console.log(source)};
}