Skip to content

Commit b42bac3

Browse files
committed
fix(postinstallHelper): reduce variables
1 parent 4e5469c commit b42bac3

File tree

1 file changed

+2
-8
lines changed

1 file changed

+2
-8
lines changed

packages/mongodb-memory-server-core/src/util/postinstallHelper.ts

Lines changed: 2 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -15,21 +15,15 @@ import {
1515

1616
findPackageJson(process.env.INIT_CWD);
1717

18-
const envDisablePostinstall: string | undefined = resolveConfig(
19-
ResolveConfigVariables.DISABLE_POSTINSTALL
20-
);
21-
22-
if (!!envToBool(envDisablePostinstall)) {
18+
if (!!envToBool(resolveConfig(ResolveConfigVariables.DISABLE_POSTINSTALL))) {
2319
console.log(
2420
'Mongodb-Memory-Server* postinstall skipped because "DISABLE_POSTINSTALL" was set to an truthy value'
2521
);
2622
process.exit(0);
2723
}
2824

29-
const envSystemBinary: string | undefined = resolveConfig(ResolveConfigVariables.SYSTEM_BINARY);
30-
3125
// value is ensured to be either an string (with more than 0 length) or being undefined
32-
if (typeof envSystemBinary === 'string') {
26+
if (typeof resolveConfig(ResolveConfigVariables.SYSTEM_BINARY) === 'string') {
3327
console.log('Mongodb-Memory-Server* postinstall skipped because "SYSTEM_BINARY" was provided');
3428
process.exit(0);
3529
}

0 commit comments

Comments
 (0)