From 46fbb6ed612222ca51e16b7a52ec9f356bab2127 Mon Sep 17 00:00:00 2001 From: Kevin Sawicki Date: Tue, 6 Sep 2016 13:40:25 -0700 Subject: [PATCH] Reset process.noAsar in finally block --- lib/common/asar.js | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) 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 + } } })