Skip to content

Commit 8aefba5

Browse files
committed
fix(DryMongoBinary): generatePaths: this function should now not hit the filesystem anymore
1 parent 6d78971 commit 8aefba5

File tree

1 file changed

+3
-5
lines changed

1 file changed

+3
-5
lines changed

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

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -158,6 +158,8 @@ export class DryMongoBinary {
158158

159159
/**
160160
* Generate an "MongoBinaryPaths" object
161+
*
162+
* This Function should not hit the FileSystem
161163
* @return an finished "MongoBinaryPaths" object
162164
*/
163165
static async generatePaths(
@@ -189,13 +191,9 @@ export class DryMongoBinary {
189191
final.modulesCache = this.combineBinaryName(path.resolve(tmpModulesCache), binaryName);
190192
}
191193

192-
// Probe if the legacy Home Cache exists, if not remove it from the list
193194
const legacyHomeCache = path.resolve(this.homedir(), '.cache/mongodb-binaries');
194195

195-
if (await pathExists(legacyHomeCache)) {
196-
log(`generatePaths: legacy home cache exist ("${legacyHomeCache}")`);
197-
final.legacyHomeCache = this.combineBinaryName(legacyHomeCache, binaryName);
198-
}
196+
final.legacyHomeCache = this.combineBinaryName(legacyHomeCache, binaryName);
199197

200198
// Resolve the config value "DOWNLOAD_DIR" if provided, otherwise remove from list
201199
const resolveConfigValue =

0 commit comments

Comments
 (0)