1
0
mirror of synced 2025-12-15 02:37:59 +08:00

Fixing variable name when overwriting input file.

It looks like at one time the variable referencing the input file was
'path', and later on it was changed to 'json', but the if
(options.inplace) block was never updated.
This commit is contained in:
Lance Roggendorff
2012-09-12 22:55:26 -05:00
parent 1d7ed8ab13
commit 0f3202370f

View File

@@ -104,7 +104,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)};
}