Merge pull request #5421 from electron/default-app-flag
Add a flag indicating app is started from default app
This commit is contained in:
commit
f58b3f853e
2 changed files with 6 additions and 0 deletions
|
@ -230,6 +230,9 @@ if (option.modules.length > 0) {
|
||||||
}
|
}
|
||||||
|
|
||||||
function loadApplicationPackage (packagePath) {
|
function loadApplicationPackage (packagePath) {
|
||||||
|
// Add a flag indicating app is started from default app.
|
||||||
|
process.defaultApp = true
|
||||||
|
|
||||||
try {
|
try {
|
||||||
// Override app name and version.
|
// Override app name and version.
|
||||||
packagePath = path.resolve(packagePath)
|
packagePath = path.resolve(packagePath)
|
||||||
|
|
|
@ -14,6 +14,9 @@ upstream node:
|
||||||
other builds it is `undefined`.
|
other builds it is `undefined`.
|
||||||
* `process.windowsStore` Boolean - If the app is running as a Windows Store app
|
* `process.windowsStore` Boolean - If the app is running as a Windows Store app
|
||||||
(appx), this value is `true`, for other builds it is `undefined`.
|
(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
|
## Events
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue