Skip to content

Commit 034c039

Browse files
test: heed npm_config_debug (#1445)
Examine `process.env.npm_config_debug` to determine whether it's a Debug or a Release build.
1 parent ea71209 commit 034c039

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

test/common/index.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -142,7 +142,7 @@ async function checkBuildType (buildType) {
142142

143143
async function whichBuildType () {
144144
let buildType = 'Release';
145-
const envBuildType = process.env.NODE_API_BUILD_CONFIG;
145+
const envBuildType = process.env.NODE_API_BUILD_CONFIG || (process.env.npm_config_debug === 'true' ? 'Debug' : 'Release');
146146
if (envBuildType) {
147147
if (Object.values(buildTypes).includes(envBuildType)) {
148148
if (await checkBuildType(envBuildType)) {

0 commit comments

Comments
 (0)