Skip to content

Commit 232c33f

Browse files
Alexander Gusevnodkz
authored andcommitted
fix(downloadUrl): elementaryOS support fixed for versions up to 0.3
1 parent e09c704 commit 232c33f

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

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

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
import getos from 'getos';
2+
import { execSync } from 'child_process';
23

34
export interface MongoBinaryDownloadUrlOpts {
45
version: string;
@@ -156,7 +157,8 @@ export default class MongoBinaryDownloadUrl {
156157

157158
// eslint-disable-next-line @typescript-eslint/no-unused-vars
158159
getElementaryOSVersionString(os: getos.Os): string {
159-
return 'ubuntu1404';
160+
const ubuntuVersion = execSync('/usr/bin/lsb_release -u -rs');
161+
return `ubuntu${ubuntuVersion.toString().replace('.', '')}`;
160162
}
161163

162164
// eslint-disable-next-line @typescript-eslint/no-unused-vars

0 commit comments

Comments
 (0)