Closed
Description
I reproduced the following bug with version 0.10.2 and 0.10.3 but it worked fine in 0.9.2 (all under Chrome 40).
Here is the code:
var github = new Github({
username: "nicolas-van",
password: 'thepassword',
auth: "basic",
});
var repo = github.getRepo("nicolas-van", "githubapitest");
repo.write("gh-pages", "test.html", 'hello', '', function(err, res) {
debugger;
});
This code works fine if test.html doesn't exist yet, but crashes with a strange error if it already exists:
Uncaught SyntaxError: Unexpected token e
I must precise that, in my test, test.html
is a simple text file containing the word "test".
Bu debugging a little I also saw that it's not really the method write()
that causes problem but the method getSha()
(which is called at the beginning of the write()
method).