Skip to content

Commit 2c8a8e1

Browse files
committed
fix: extract dll for Win32
Related #61
1 parent b68b43d commit 2c8a8e1

File tree

1 file changed

+8
-4
lines changed

1 file changed

+8
-4
lines changed

src/util/MongoBinaryDownload.js

+8-4
Original file line numberDiff line numberDiff line change
@@ -111,10 +111,14 @@ export default class MongoBinaryDownload {
111111
this.debug(`extract(): ${extractDir}`);
112112
await fs.ensureDir(extractDir);
113113

114-
const filter =
115-
this.platform === 'win32'
116-
? file => /bin\/mongod.exe$/.test(file.path)
117-
: file => /bin\/mongod$/.test(file.path);
114+
let filter;
115+
if (this.platform === 'win32') {
116+
filter = file => {
117+
return /bin\/mongod.exe$/.test(file.path) || /.dll$/.test(file.path);
118+
};
119+
} else {
120+
filter = file => /bin\/mongod$/.test(file.path);
121+
}
118122

119123
await decompress(mongoDBArchive, extractDir, {
120124
// extract only `bin/mongod` file

0 commit comments

Comments
 (0)