We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 1abad7c commit 0b010bfCopy full SHA for 0b010bf
packages/mongodb-memory-server-core/src/util/MongoBinary.ts
@@ -108,7 +108,7 @@ export default class MongoBinary {
108
109
// if we're in postinstall script, npm will set the cwd too deep
110
let nodeModulesDLDir = process.cwd();
111
- while (new RegExp(`node_modules${path.sep}mongodb-memory-server`).test(nodeModulesDLDir)) {
+ while (nodeModulesDLDir.endsWith(`node_modules${path.sep}mongodb-memory-server`)) {
112
nodeModulesDLDir = path.resolve(nodeModulesDLDir, '..', '..');
113
}
114
0 commit comments