Skip to content

Commit 6cbe971

Browse files
Merge pull request #2257 from DustinCampbell/fix-omnisharp-download
Set the correct installBinary to test for
2 parents f88b1a7 + c69f7e8 commit 6cbe971

File tree

2 files changed

+10
-16
lines changed

2 files changed

+10
-16
lines changed

src/omnisharp/OmnisharpPackageCreator.ts

Lines changed: 3 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -22,17 +22,11 @@ export function GetPackagesFromVersion(version: string, runTimeDependencies: Pac
2222

2323
export function SetBinaryAndGetPackage(inputPackage: Package, serverUrl: string, version: string, installPath: string): Package {
2424
let installBinary: string;
25-
if (inputPackage.platformId == "win-x86" || inputPackage.platformId == "win-x64") {
25+
if (inputPackage.platformId === "win-x86" || inputPackage.platformId === "win-x64") {
2626
installBinary = "OmniSharp.exe";
2727
}
28-
else if (inputPackage.platformId == "osx") {
29-
installBinary = "mono.osx";
30-
}
31-
else if (inputPackage.platformId == "linux-x86") {
32-
installBinary = "mono.linux-x86";
33-
}
34-
else if (inputPackage.platformId == "linux-x64") {
35-
installBinary = "mono.linux-x86_64";
28+
else {
29+
installBinary = "run";
3630
}
3731

3832
return GetPackage(inputPackage, serverUrl, version, installPath, installBinary);

test/featureTests/OmnisharpPackageCreator.test.ts

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -77,22 +77,22 @@ suite("GetOmnisharpPackage : Output package depends on the input package and oth
7777
resultPackage.installTestPath.should.equal("./experimentPath/1.2.3/OmniSharp.exe");
7878
});
7979

80-
test('Install test path is calculated using specified path, version and ends with mono.osx - OSX', () => {
80+
test('Install test path is calculated using specified path, version and ends with run - OSX', () => {
8181
let testPackage = inputPackages.find(element => (element.platformId && element.platformId == "osx"));
8282
let resultPackage = SetBinaryAndGetPackage(testPackage, serverUrl, "1.2.3", "experimentPath");
83-
resultPackage.installTestPath.should.equal("./experimentPath/1.2.3/mono.osx");
83+
resultPackage.installTestPath.should.equal("./experimentPath/1.2.3/run");
8484
});
8585

86-
test('Install test path is calculated using specified path, version and ends with mono.linux-x86 - Linux(x86)', () => {
86+
test('Install test path is calculated using specified path, version and ends with run - Linux(x86)', () => {
8787
let testPackage = inputPackages.find(element => (element.platformId && element.platformId == "linux-x86"));
8888
let resultPackage = SetBinaryAndGetPackage(testPackage, serverUrl, "1.2.3", "experimentPath");
89-
resultPackage.installTestPath.should.equal("./experimentPath/1.2.3/mono.linux-x86");
89+
resultPackage.installTestPath.should.equal("./experimentPath/1.2.3/run");
9090
});
9191

92-
test('Install test path is calculated using specified path, version and ends with mono.linux-x86_64 - Linux(x64)', () => {
92+
test('Install test path is calculated using specified path, version and ends with run - Linux(x64)', () => {
9393
let testPackage = inputPackages.find(element => (element.platformId && element.platformId == "linux-x64"));
9494
let resultPackage = SetBinaryAndGetPackage(testPackage, serverUrl, "1.2.3", "experimentPath");
95-
resultPackage.installTestPath.should.equal("./experimentPath/1.2.3/mono.linux-x86_64");
95+
resultPackage.installTestPath.should.equal("./experimentPath/1.2.3/run");
9696
});
9797
});
9898

@@ -155,7 +155,7 @@ suite('GetPackagesFromVersion : Gets the experimental omnisharp packages from a
155155
let outPackages = GetPackagesFromVersion("1.1.1", inputPackages, serverUrl, "experimentPath");
156156
outPackages.length.should.equal(2);
157157
outPackages[0].installTestPath.should.equal("./experimentPath/1.1.1/OmniSharp.exe");
158-
outPackages[1].installTestPath.should.equal("./experimentPath/1.1.1/mono.osx");
158+
outPackages[1].installTestPath.should.equal("./experimentPath/1.1.1/run");
159159
});
160160

161161
test('Returns only omnisharp packages with experimentalIds', () => {

0 commit comments

Comments
 (0)