I have the following code
var cloneOptions = {};
cloneOptions.remoteCallbacks = {
credentials: function(url, userName) {
return NodeGit.Cred.sshKeyFromAgent(userName);
}
};
logger.info('Cloning snapshot repo');
var getMostRecentCommit = function(repository) {
return repository.getBranchCommit('master');
};
var getCommitMessage = function(commit) {
return commit.message();
};
NodeGit.Clone(remoteRepo, path.join('_deployments',deployFolderName), cloneOptions )
.then(getMostRecentCommit, function() { logger.error('error %o', arguments);})
.then(getCommitMessage, function() { logger.error('error %o', arguments);})
.then(function(message) {
return logger.info(message);
}, function() { logger.error('error %o', arguments);});
This is largely copypasta from your site.
The NodeGit.* chain is working fine; the repo is being cloned and I'm getting the right commit message.
However, my application then just sits and waits. There's no indication in the nodegit docs that I need to manually resolve the Promise or anything like in order for my application to complete.
What am I missing here? Or is this a nodegit bug?
I have the following code
This is largely copypasta from your site.
The
NodeGit.*chain is working fine; the repo is being cloned and I'm getting the right commit message.However, my application then just sits and waits. There's no indication in the nodegit docs that I need to manually resolve the Promise or anything like in order for my application to complete.
What am I missing here? Or is this a nodegit bug?