Skip to content

Commit

Permalink
fix: check for empty diff (#1273)
Browse files Browse the repository at this point in the history
* 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
  • Loading branch information
voxpelli authored and tmcw committed Sep 9, 2019
1 parent 1548574 commit 3e0958b
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/commands/readme.js
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}
Expand Down

0 comments on commit 3e0958b

Please sign in to comment.