desktop / dugite

Elegant bindings for working with Git in your Node applications
MIT License
462 stars 149 forks source link

feat: kill git process #551

Closed heyouquan closed 2 weeks ago

heyouquan commented 1 year ago

use ps-tree to list the sub process pid and kill the process

niik commented 2 weeks ago

This is out of scope for dugite I'm afraid. Try using the processCallback option to get a reference to the ChildProcess from which you can send a gentle signal depending on the command you're running (i.e. SIGHUP for git clone) which will let Git clean up its subprocesses. If that doesn't work you have the option of replicating the process in this PR in your dependent project.