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:
parent
057127f4de
commit
afd2ccfb4f
@ -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");
|
||||
|
@ -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;
|
||||
|
@ -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)) {
|
||||
|
Loading…
Reference in New Issue
Block a user