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.
|
// This is handled via a runtime notification.
|
||||||
dialog.dialog("close");
|
dialog.dialog("close");
|
||||||
},
|
},
|
||||||
|
'missing_package_file': function(error) {
|
||||||
|
// This is handled via a runtime notification.
|
||||||
|
dialog.dialog("close");
|
||||||
|
},
|
||||||
'project_empty': function(error) {
|
'project_empty': function(error) {
|
||||||
// This is handled via a runtime notification.
|
// This is handled via a runtime notification.
|
||||||
dialog.dialog("close");
|
dialog.dialog("close");
|
||||||
@ -1565,6 +1569,10 @@ RED.projects = (function() {
|
|||||||
// This is handled via a runtime notification.
|
// This is handled via a runtime notification.
|
||||||
dialog.dialog("close");
|
dialog.dialog("close");
|
||||||
},
|
},
|
||||||
|
'missing_package_file': function(error) {
|
||||||
|
// This is handled via a runtime notification.
|
||||||
|
dialog.dialog("close");
|
||||||
|
},
|
||||||
'project_empty': function(error) {
|
'project_empty': function(error) {
|
||||||
// This is handled via a runtime notification.
|
// This is handled via a runtime notification.
|
||||||
dialog.dialog("close");
|
dialog.dialog("close");
|
||||||
|
@ -459,7 +459,7 @@ Project.prototype.status = function(user, includeRemote) {
|
|||||||
gitTools.getStatus(self.path),
|
gitTools.getStatus(self.path),
|
||||||
fs.exists(fspath.join(self.path,".git","MERGE_HEAD"))
|
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];
|
var result = results[0];
|
||||||
if (results[1]) {
|
if (results[1]) {
|
||||||
result.merging = true;
|
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 exec.run(gitCommand, args, {cwd:cwd, env:env}, emit).then(result => {
|
||||||
return result.stdout;
|
return result.stdout;
|
||||||
}).catch(result => {
|
}).catch(result => {
|
||||||
var err = new Error(stderr);
|
|
||||||
var stdout = result.stdout;
|
var stdout = result.stdout;
|
||||||
var stderr = result.stderr;
|
var stderr = result.stderr;
|
||||||
|
var err = new Error(stderr);
|
||||||
err.stdout = stdout;
|
err.stdout = stdout;
|
||||||
err.stderr = stderr;
|
err.stderr = stderr;
|
||||||
if (/Connection refused/i.test(stderr)) {
|
if (/Connection refused/i.test(stderr)) {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user