1
0
mirror of https://github.com/node-red/node-red.git synced 2023-10-10 13:36:53 +02:00

Add detection of connection timeout in git communication

Fixes #1770
This commit is contained in:
Nick O'Leary 2018-07-11 13:26:45 +01:00
parent 88b153bc12
commit dba195b396
No known key found for this signature in database
GPG Key ID: 4F2157149161A6C9

View File

@ -50,6 +50,8 @@ function runGitCommand(args,cwd,env) {
err.stderr = stderr;
if (/Connection refused/i.test(stderr)) {
err.code = "git_connection_failed";
} else if (/Connection timed out/i.test(stderr)) {
err.code = "git_connection_failed";
} else if (/fatal: could not read/i.test(stderr)) {
// Username/Password
err.code = "git_auth_failed";