Handle more repo clone error cases

This commit is contained in:
Nick O'Leary
2018-02-01 10:42:14 +00:00
parent 4117961236
commit d0d93d7070
2 changed files with 28 additions and 1 deletions

View File

@@ -63,6 +63,10 @@ function runGitCommand(args,cwd,env) {
err.code = "git_delete_branch_unmerged";
} else if (/remote .* already exists/.test(stderr)) {
err.code = "git_remote_already_exists";
} else if (/does not appear to be a git repository/.test(stderr)) {
err.code = "git_not_a_repository";
} else if (/Repository not found/i.test(stderr)) {
err.code = "git_repository_not_found";
}
return reject(err);
}