From ee286d1f3081b29ba1edb71df27e5b909eb18a7f Mon Sep 17 00:00:00 2001 From: Airton Zanon Date: Mon, 26 Aug 2019 10:07:30 +0200 Subject: [PATCH] Fix the way to write the correct JSON on file Signed-off-by: Airton Zanon --- lib/cli.js | 6 +----- package.json | 2 +- 2 files changed, 2 insertions(+), 6 deletions(-) diff --git a/lib/cli.js b/lib/cli.js index 107494d..4f9648a 100755 --- a/lib/cli.js +++ b/lib/cli.js @@ -46,11 +46,7 @@ function fixJson(filePath, formatted) { return; } - fs.writeFile(filePath, formatted, (err) => { - if (err) { - process.exit(1); - } - }); + fs.writeFileSync(filePath, formatted); console.log(filePath + " - has been fixed"); hasErrors = false; } diff --git a/package.json b/package.json index 4f10fc2..ab07287 100644 --- a/package.json +++ b/package.json @@ -8,7 +8,7 @@ "code", "style" ], - "version": "0.1.0", + "version": "0.1.1", "preferGlobal": true, "repository": { "type": "git",