Skip to content

Commit 3e0958b

Browse files
voxpellitmcw
authored andcommitted
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
1 parent 1548574 commit 3e0958b

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/commands/readme.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -101,7 +101,7 @@ module.exports.handler = function readme(argv) {
101101
'',
102102
''
103103
);
104-
if (!diffRaw.length) {
104+
if (diffRaw.split('\n').length === 5) {
105105
log(`${argv.readmeFile} is up to date.`);
106106
process.exit(0);
107107
}

0 commit comments

Comments
 (0)