diff --git a/lib/services/project-service.ts b/lib/services/project-service.ts index e27398cd8f..a9f15591c5 100644 --- a/lib/services/project-service.ts +++ b/lib/services/project-service.ts @@ -35,8 +35,16 @@ export class ProjectService implements IProjectService { var customAppPath = this.getCustomAppPath(); if(customAppPath) { customAppPath = path.resolve(customAppPath); + if(!this.$fs.exists(customAppPath).wait()) { + this.$errors.failWithoutHelp(`The specified path "${customAppPath}" doesn't exist. Check that you specified the path correctly and try again.`); + } + + let customAppContents = this.$fs.enumerateFilesInDirectorySync(customAppPath); + if(customAppContents.length === 0) { + this.$errors.failWithoutHelp(`The specified path "${customAppPath}" is empty directory.`); + } } - + if(this.$fs.exists(projectDir).wait() && !this.$fs.isEmptyDir(projectDir).wait()) { this.$errors.fail("Path already exists and is not empty %s", projectDir); }