Skip to content

Commit 751c0e5

Browse files
authored
Merge pull request #1346 from rcjsuen/posix-path
Fix example by forcing backslashes with path.posix
2 parents f7d0404 + 11efffd commit 751c0e5

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

examples/add-and-commit.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ nodegit.Repository.open(path.resolve(__dirname, "../.git"))
4646
})
4747
.then(function() {
4848
// this file is in a subdirectory and can use a relative path
49-
return index.addByPath(path.join(directoryName, fileName));
49+
return index.addByPath(path.posix.join(directoryName, fileName));
5050
})
5151
.then(function() {
5252
// this will write both files to the index

0 commit comments

Comments
 (0)