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 e77f010 commit ae7ddabCopy full SHA for ae7ddab
packages/mongodb-memory-server-core/src/util/MongoBinaryDownloadUrl.ts
@@ -55,7 +55,14 @@ export class MongoBinaryDownloadUrl implements MongoBinaryDownloadUrlOpts {
55
log(`Using "${mirror}" as the mirror`);
56
57
const url = new URL(mirror);
58
- url.pathname = `/${this.platform}/${archive}`;
+
59
+ // ensure that the "mirror" path ends with "/"
60
+ if (!url.pathname.endsWith('/')) {
61
+ url.pathname = url.pathname + '/';
62
+ }
63
64
+ // no extra "/" between "pathname" and "platfrom", because of the "if" statement above to ensure "url.pathname" to end with "/"
65
+ url.pathname = `${url.pathname}${this.platform}/${archive}`;
66
67
return url.toString();
68
}
0 commit comments