Ensure auth failure on project fetch identifies the remote

Fixes #2545
This commit is contained in:
Nick O'Leary
2020-05-21 17:18:46 +01:00
parent 05c3f459ad
commit 0de49e2a75
2 changed files with 11 additions and 3 deletions

View File

@@ -706,7 +706,9 @@ Project.prototype.fetch = function(user,remoteName) {
promise = promise.then(function() {
return gitTools.fetch(project.path,remote,authCache.get(project.name,project.remotes[remote].fetch,username))
}).catch(function(err) {
err.remote = remote;
if (!err.remote) {
err.remote = remote;
}
throw err;
})
});