diff --git a/lib/common/asar.js b/lib/common/asar.js index fcb26ba97b7..40fdec9494e 100644 --- a/lib/common/asar.js +++ b/lib/common/asar.js @@ -675,9 +675,11 @@ childProcess[functionName] = function () { const processNoAsarOriginalValue = process.noAsar process.noAsar = true - const result = old.apply(this, arguments) - process.noAsar = processNoAsarOriginalValue - return result + try { + return old.apply(this, arguments) + } finally { + process.noAsar = processNoAsarOriginalValue + } } })