From 85c275bed8f3dd3d09cb719b80fcec855add85f7 Mon Sep 17 00:00:00 2001 From: sinkhaha <1468709106@qq.com> Date: Tue, 23 May 2023 10:54:09 +0800 Subject: [PATCH] lib: use existing `isWindows` variable --- lib/internal/errors.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/internal/errors.js b/lib/internal/errors.js index 79c4c7fd024156..85d64d6e0c91e2 100644 --- a/lib/internal/errors.js +++ b/lib/internal/errors.js @@ -787,7 +787,7 @@ const fatalExceptionStackEnhancers = { // However, fatal error are handled differently and we cannot easily // highlight them. On Windows, detecting whether a console supports // ANSI escape sequences is not reliable. - if (process.platform === 'win32') { + if (isWindows) { const info = internalBinding('os').getOSInformation(); const ver = ArrayPrototypeMap(StringPrototypeSplit(info[2], '.'), Number);