From 034c039298d8a9654056a1fb7ce9af20b1b04df8 Mon Sep 17 00:00:00 2001 From: Gabriel Schulhof Date: Fri, 16 Feb 2024 08:17:25 -0800 Subject: [PATCH] test: heed npm_config_debug (#1445) Examine `process.env.npm_config_debug` to determine whether it's a Debug or a Release build. --- test/common/index.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test/common/index.js b/test/common/index.js index ae0350ec7..2469151ef 100644 --- a/test/common/index.js +++ b/test/common/index.js @@ -142,7 +142,7 @@ async function checkBuildType (buildType) { async function whichBuildType () { let buildType = 'Release'; - const envBuildType = process.env.NODE_API_BUILD_CONFIG; + const envBuildType = process.env.NODE_API_BUILD_CONFIG || (process.env.npm_config_debug === 'true' ? 'Debug' : 'Release'); if (envBuildType) { if (Object.values(buildTypes).includes(envBuildType)) { if (await checkBuildType(envBuildType)) {