From 3e0958b033efc409163af244c618b09eca940792 Mon Sep 17 00:00:00 2001 From: Pelle Wessman Date: Mon, 9 Sep 2019 18:21:39 +0200 Subject: [PATCH] fix: check for empty diff (#1273) * Fix check for empty diff Compare to the result of the latest diff module: https://runkit.com/embed/y4qzdzzz05qr No diff gives this result: ``` Index: =================================================================== --- +++ ``` * Actually check the right thing in the fix as well --- src/commands/readme.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/commands/readme.js b/src/commands/readme.js index 11e81d351..00813c63c 100644 --- a/src/commands/readme.js +++ b/src/commands/readme.js @@ -101,7 +101,7 @@ module.exports.handler = function readme(argv) { '', '' ); - if (!diffRaw.length) { + if (diffRaw.split('\n').length === 5) { log(`${argv.readmeFile} is up to date.`); process.exit(0); }