Handle cloning a project without package.json

This commit is contained in:
Nick O'Leary
2018-05-02 16:24:58 +01:00
parent c4d1ccb6f5
commit 53e3e08d70
5 changed files with 78 additions and 15 deletions

View File

@@ -479,6 +479,12 @@ function getFlows() {
error.code = "project_empty";
return when.reject(error);
}
if (activeProject.missingFiles && activeProject.missingFiles.indexOf('package.json') !== -1) {
log.warn("Project missing package.json");
error = new Error("Project missing package.json");
error.code = "missing_package_file";
return when.reject(error);
}
if (!activeProject.getFlowFile()) {
log.warn("Project has no flow file");
error = new Error("Project has no flow file");