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:
@@ -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)};
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user