Fix commit count not being correct
This commit is contained in:
parent
3a334b3347
commit
c16a42bf2b
1 changed files with 1 additions and 1 deletions
|
@ -22,7 +22,7 @@ module.exports = {
|
||||||
cmd = `git log --oneline ${commits}`;
|
cmd = `git log --oneline ${commits}`;
|
||||||
exec(cmd, (err, stdout, stderr) =>{
|
exec(cmd, (err, stdout, stderr) =>{
|
||||||
process.stdout.write(stdout)
|
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}`)
|
msg.edit(`${sendText}\n\nLatest commits (${commitCount}):\n${stdout}`)
|
||||||
if (err) console.log(stderr)
|
if (err) console.log(stderr)
|
||||||
})
|
})
|
||||||
|
|
Loading…
Add table
Reference in a new issue