FazBrowse GitHub Viewer | Trending |
URL:
| Home
Tools: [Download Repo ZIP]   [Original HTTPS Page]

nodegit doesn't return control to the calling application · Issue #497 · nodegit/nodegit · GitHub

Repository navigation

nodegit doesn't return control to the calling application #497

Description

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?

No activity

Activity on this issue will appear here.

Activity

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions


      Back | FazBrowse Home | New Git URL