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

Detect the cloning of an empty git repo properly

This commit is contained in:
Nick O'Leary 2019-02-14 14:00:25 +00:00
parent 057127f4de
commit afd2ccfb4f
No known key found for this signature in database
GPG Key ID: 4F2157149161A6C9
3 changed files with 10 additions and 2 deletions

View File

@ -666,6 +666,10 @@ RED.projects = (function() {
// This is handled via a runtime notification.
dialog.dialog("close");
},
'missing_package_file': function(error) {
// This is handled via a runtime notification.
dialog.dialog("close");
},
'project_empty': function(error) {
// This is handled via a runtime notification.
dialog.dialog("close");
@ -1565,6 +1569,10 @@ RED.projects = (function() {
// This is handled via a runtime notification.
dialog.dialog("close");
},
'missing_package_file': function(error) {
// This is handled via a runtime notification.
dialog.dialog("close");
},
'project_empty': function(error) {
// This is handled via a runtime notification.
dialog.dialog("close");

View File

@ -459,7 +459,7 @@ Project.prototype.status = function(user, includeRemote) {
gitTools.getStatus(self.path),
fs.exists(fspath.join(self.path,".git","MERGE_HEAD"))
];
return when.all(promises).then(function(results) {
return Promise.all(promises).then(function(results) {
var result = results[0];
if (results[1]) {
result.merging = true;

View File

@ -32,9 +32,9 @@ function runGitCommand(args,cwd,env,emit) {
return exec.run(gitCommand, args, {cwd:cwd, env:env}, emit).then(result => {
return result.stdout;
}).catch(result => {
var err = new Error(stderr);
var stdout = result.stdout;
var stderr = result.stderr;
var err = new Error(stderr);
err.stdout = stdout;
err.stderr = stderr;
if (/Connection refused/i.test(stderr)) {