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 c0975c3 commit 613e670Copy full SHA for 613e670
packages/mongodb-memory-server-core/src/util/MongoBinary.ts
@@ -89,7 +89,8 @@ export class MongoBinary {
89
if (!isNullOrUndefined(binaryPath)) {
90
log(`getPath: Spawning binaryPath "${binaryPath}" to get version`);
91
const spawnOutput = spawnSync(binaryPath, ['--version'])
92
- .stdout.toString()
+ // NOTE: "stdout" seemingly can be "undefined", see https://github.com/typegoose/mongodb-memory-server/issues/742#issuecomment-2528284865
93
+ .stdout?.toString()
94
// this regex is to match the first line of the "mongod --version" output "db version v4.0.25" OR "db version v4.2.19-11-ge2f2736"
95
.match(/^\s*db\s+version\s+v?(\d+\.\d+\.\d+)(-\d*)?(-[a-zA-Z0-9].*)?\s*$/im);
96
0 commit comments