]> khamidou — GitHub mirrors - electron.git/commitdiff
Exit the process when unable to find a valid app
authorCheng Zhao <zcbenz@gmail.com>
Wed, 30 Sep 2015 09:29:38 +0000 (17:29 +0800)
committerCheng Zhao <zcbenz@gmail.com>
Wed, 30 Sep 2015 09:30:28 +0000 (17:30 +0800)
Fixes #2583.

atom/browser/lib/init.coffee

index 1299364d2fa61a4369521351698b407ffd4fb12c..454baf0b8ac57c32528de21db17f442a7db1b23d 100644 (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?