Merge pull request #7978 from electron/memoize-no-asar-env-check
Memoize ELECTRON_NO_ASAR env var check
This commit is contained in:
commit
bee5ced8f4
1 changed files with 2 additions and 7 deletions
|
@ -10,14 +10,9 @@
|
|||
// Cache asar archive objects.
|
||||
const cachedArchives = {}
|
||||
|
||||
const envNoAsar = process.env.ELECTRON_NO_ASAR && process.type !== 'browser' && process.type !== 'renderer'
|
||||
const isAsarDisabled = function () {
|
||||
if (process.noAsar) {
|
||||
return true
|
||||
}
|
||||
if (process.env.ELECTRON_NO_ASAR && process.type !== 'browser' && process.type !== 'renderer') {
|
||||
return true
|
||||
}
|
||||
return false
|
||||
return process.noAsar || envNoAsar
|
||||
}
|
||||
|
||||
const getOrCreateArchive = function (p) {
|
||||
|
|
Loading…
Reference in a new issue