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 e48976d commit 0d990d3Copy full SHA for 0d990d3
packages/mongodb-memory-server-core/src/util/MongoBinary.ts
@@ -93,7 +93,8 @@ export class MongoBinary {
93
log(`getPath: Spawning binaryPath "${binaryPath}" to get version`);
94
const spawnOutput = spawnSync(binaryPath, ['--version'])
95
.toString()
96
- .match(/^db\sversion\s(v?\d+\.\d+\.\d+)$/im);
+ // this regex is to match the first line of the "mongod --version" output "db version v4.0.20"
97
+ .match(/^\s*db\s+version\s+v?(\d+\.\d+\.\d+)\s*$/im);
98
99
assertion(
100
!isNullOrUndefined(spawnOutput),
0 commit comments