Skip to content

"examples/add-and-commit.js" throw "Error: Invalid path: xxx" on windows #1339

Description

@BoyBoBo

os: windows 7
nodegit: 0.18.3

This line will throw "Error: Invalid path: xxx"

index.addByPath(path.join(directoryName, fileName))

I changed it to the following, it's ok

index.addByPath(directoryName + '/' + fileName)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions