Add a flag indicating app is started from default app

This commit is contained in:
Cheng Zhao 2016-05-06 21:48:51 +09:00
parent 7b83d920fa
commit c18880bd77
2 changed files with 6 additions and 0 deletions

View file

@ -230,6 +230,9 @@ if (option.modules.length > 0) {
}
function loadApplicationPackage (packagePath) {
// Add a flag indicating app is started from default app.
process.defaultApp = true
try {
// Override app name and version.
packagePath = path.resolve(packagePath)

View file

@ -14,6 +14,9 @@ upstream node:
other builds it is `undefined`.
* `process.windowsStore` Boolean - If the app is running as a Windows Store app
(appx), this value is `true`, for other builds it is `undefined`.
* `process.defaultApp` Boolean - When app is started by being passed as parameter
to the default app, this value is `true` in the main process, otherwise it is
`undefined`.
## Events