Exit the process when unable to find a valid app

Fixes #2583.
This commit is contained in:
Cheng Zhao 2015-09-30 17:29:38 +08:00
parent 8b65d37861
commit 8c3116851d

View file

@ -64,7 +64,9 @@ for packagePath in searchPaths
catch e
continue
throw new Error("Unable to find a valid app") unless packageJson?
unless packageJson?
process.nextTick -> process.exit 1
throw new Error("Unable to find a valid app")
# Set application's version.
app.setVersion packageJson.version if packageJson.version?