Skip to content

Path must be a string. Received undefined #12

Open
@marcuswhybrow

Description

@marcuswhybrow

Using GitKit v0.1.0 to clone a repository with isBare = false I get the aforementioned error. Setting isBare to true doesn't give the error.

var isBare = false;
var repo = GitKit.Repository.createWithFS(NodeFS('/tmp/repo'), isBare);
var transport = new GitKit.HTTPTransport('https://github.com/marcuswhybrow/marcus.codes.git');

GitKit.RepoUtils.init(repo)
    .then(() => GitKit.TransferUtils.clone(repo, transport))

This is my stack trace:

"assertPath (path.js:8:11)",
"Object.posix.join (path.js:479:5)",
"Record.Repository.getGitPath (/var/task/node_modules/gitkit/lib/models/repo.js:65:43)",
"Record.Repository.readGitFile (/var/task/node_modules/gitkit/lib/models/repo.js:75:21)",
"Function.Ref.readFromRepo (/var/task/node_modules/gitkit/lib/models/ref.js:85:17)",
"Object.checkout (/var/task/node_modules/gitkit/lib/RepoUtils/checkout.js:79:16)",
"/var/task/node_modules/gitkit/lib/TransferUtils/clone.js:18:26",
"_fulfilled (/var/task/node_modules/gitkit/node_modules/q/q.js:834:54)",
"self.promiseDispatch.done (/var/task/node_modules/gitkit/node_modules/q/q.js:863:30)",
"Promise.promise.promiseDispatch (/var/task/node_modules/gitkit/node_modules/q/q.js:796:13)"

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions