rkotze / git-mob

Co-author commits tool. A cross-platform command-line tool for social coding. Includes co-authors in commits when pair/mob programming.
https://www.npmjs.com/package/git-mob
MIT License
183 stars 21 forks source link

Setting mob gives UnhandledPromiseRejectionWarning #4

Closed dideler closed 6 years ago

dideler commented 6 years ago

Steps to reproduce:

  1. Remove the .git/.gitmessage file from the repo if it's present
  2. Set the mob with a co-author that exists in ~/.git-authors

Expected:

↪ git mob rk
Dennis Ideler <dideler@findmypast.com>
Richard Kotze <rkotze@findmypast.com>

Actual:

↪ git mob rk
Dennis Ideler <dideler@findmypast.com>
Richard Kotze <rkotze@findmypast.com>
(node:16471) UnhandledPromiseRejectionWarning: Error: ENOENT: no such file or directory, open '.git/.gitmessage'
(node:16471) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). (rejection id: 1)
(node:16471) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code

Environment info:

↪ git rev-parse HEAD
ce80f51116290a3a61ad3e0c6390b228125ca085
↪ node -v
v8.9.1
↪ npm -v
5.6.0
↪ distro
NAME="Ubuntu"
VERSION="17.10 (Artful Aardvark)"
rkotze commented 6 years ago

I've fixed this bug with this commit 6cbe73c31fb8cc3208be321c23694cba7a141d4c