Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Nodegit operations prevent process from exiting automatically. #920

Closed
bpeabody opened this issue Feb 24, 2016 · 10 comments
Closed

Nodegit operations prevent process from exiting automatically. #920

bpeabody opened this issue Feb 24, 2016 · 10 comments

Comments

@bpeabody
Copy link

I'm finding that when I use nodegit, I have to explicitly call process.exit() to get my process to exit. I apologize in advance if I am missing something fundamental or simple.

The sample program below never exits for me (I put the call to .free() in for good measure):

const NodeGit = require("nodegit");

NodeGit.Clone("https://github.com/nodegit/nodegit.git", "no-progress")
.done(function (repo) {
    repo.free();
    console.log("I'm done");
});
@johnhaley81
Copy link
Collaborator

There must be something in the creation/execution of an async action that's preventing the process from closing down. We'll have to dig into this.

@johnhaley81
Copy link
Collaborator

@bpeabody I can't get this code to hang for me. Does this still break for you?

@bpeabody
Copy link
Author

@johnhaley81 it does still hang for me, but if it's not hanging for anyone else, I'm going to guess there is something off about my setup. I'm running under OS X, just installed the latest (0.11.9) release of nodegit.

@johnhaley81
Copy link
Collaborator

Here's exactly what I'm doing:

mkdir test
cd test
npm install nodegit
printf "const NodeGit = require('nodegit');\n\n NodeGit.Clone('https://github.com/nodegit/nodegit.git', 'no-progress').done(function (repo) { repo.free(); console.log('I am done'); });" >> test.js
node test.js

And no hang :(

@bpeabody
Copy link
Author

I think I had actually flubbed the upgrade and it's no longer happening for me.

@johnhaley81
Copy link
Collaborator

👍

@tbranyen
Copy link
Member

@johnhaley81 didn't you read the memo, github has reactions now!

@johnhaley81
Copy link
Collaborator

OMFGGGGGGGGGGGG!!!

@johnhaley81
Copy link
Collaborator

Also I swear that the reaction button wasn't there when I typed that....

@tbranyen
Copy link
Member

lol I think the announcement and rollout happened as you typed it

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants