]> khamidou — GitHub mirrors - electron.git/commitdiff
The default_app should also set process.mainModule.
authorCheng Zhao <zcbenz@gmail.com>
Sun, 22 Jun 2014 06:57:11 +0000 (14:57 +0800)
committerCheng Zhao <zcbenz@gmail.com>
Sun, 22 Jun 2014 06:57:11 +0000 (14:57 +0800)
atom/browser/default_app/main.js

index b0b5d9efa4c3a070fb909e69ecb15a82a51e029e..4afe4823ba47ad418d966d3eca14dd02dba76a57 100644 (file)
@@ -30,7 +30,7 @@ if (argv._.length > 0) {
     }
 
     // Run the app.
-    require(packagePath);
+    require('module')._load(packagePath, module, true);
   } catch(e) {
     if (e.code == 'MODULE_NOT_FOUND') {
       app.focus();