Skip to content

Commit 2ce5308

Browse files
committed
error handling has changed in nodegit
1 parent 3132c05 commit 2ce5308

1 file changed

Lines changed: 3 additions & 2 deletions

File tree

routes/mirror.js

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,8 @@ function openRepo(repo) {
3939
},
4040
function(reasonForFailure) {
4141
console.error(reasonForFailure)
42-
if(/Failed to resolve path/.test(reasonForFailure) || /Could not find repository/.test(reasonForFailure)) {
42+
// failed to resolve path || could not find repository
43+
if(reasonForFailure.errno === -3) {
4344
cloneRepo(repo, function(err) {
4445
if(err) return reject(err)
4546
resolve()
@@ -95,4 +96,4 @@ function executeCmd(cmd, cb) {
9596
})
9697
}
9798

98-
module.exports = router
99+
module.exports = router

0 commit comments

Comments
 (0)