Fix commit count not being correct

This commit is contained in:
SileNce5k 2021-07-08 12:38:31 +02:00
parent 3a334b3347
commit c16a42bf2b
No known key found for this signature in database
GPG key ID: C507260E7F2583AD

View file

@ -22,7 +22,7 @@ module.exports = {
cmd = `git log --oneline ${commits}`;
exec(cmd, (err, stdout, stderr) =>{
process.stdout.write(stdout)
let commitCount = stdout.split(/\r\n|\r|\n/).length
let commitCount = stdout.split(/\r\n|\r|\n/).length - 1
msg.edit(`${sendText}\n\nLatest commits (${commitCount}):\n${stdout}`)
if (err) console.log(stderr)
})