Skip to content

Commit

Permalink
fix: Fix binary download on debian testing/unstable
Browse files Browse the repository at this point in the history
  • Loading branch information
orgads committed Aug 16, 2023
1 parent 36bc050 commit 15b75ee
Showing 1 changed file with 4 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -289,7 +289,9 @@ export class MongoBinaryDownloadUrl implements MongoBinaryDownloadUrlOpts {
throw new UnknownVersionError(this.version);
}

if (release >= 11 || ['unstable', 'testing'].includes(os.release)) {
const isTesting = ['unstable', 'testing', ''].includes(os.release);

if (isTesting || release >= 11) {
// Debian 11 is compatible with the binaries for debian 10
// but does not have binaries for before 5.0.8
// and only set to use "debian10" if the requested version is not a latest version
Expand All @@ -309,7 +311,7 @@ export class MongoBinaryDownloadUrl implements MongoBinaryDownloadUrlOpts {
name += '71';
}

if (release >= 10) {
if (isTesting || release >= 10) {
if (semver.lt(coercedVersion, '4.2.1') && !testVersionIsLatest(this.version)) {
throw new KnownVersionIncompatibilityError(
`Debian ${release}`,
Expand Down

0 comments on commit 15b75ee

Please sign in to comment.