Skip to content

Commit ff1da58

Browse files
authored
fixing wget issue for remote wget download (#219)
* fixing wget issue for remote wget download * reverting profiles * fixing UTs and updating version of VC * fixing json formatting
1 parent b4477a4 commit ff1da58

File tree

4 files changed

+18
-17
lines changed

4 files changed

+18
-17
lines changed

.pipelines/azure-pipelines-linux.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ resources:
1616
options: --entrypoint=""
1717

1818
variables:
19-
VcVersion : 1.13.1
19+
VcVersion : 1.13.2
2020
ROOT: $(Build.SourcesDirectory)
2121
CDP_DEFINITION_BUILD_COUNT: $[counter('', 0)] # needed for onebranch.pipeline.version task https://aka.ms/obpipelines/versioning
2222
ENABLE_PRS_DELAYSIGN: 1

.pipelines/azure-pipelines.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ pool:
1818
vmImage: windows-latest
1919

2020
variables:
21-
VcVersion : 1.13.1
21+
VcVersion : 1.13.2
2222
ROOT: $(Build.SourcesDirectory)
2323
CDP_DEFINITION_BUILD_COUNT: $[counter('', 0)] # needed for onebranch.pipeline.version task https://aka.ms/obpipelines/versioning
2424
ENABLE_PRS_DELAYSIGN: 1

src/VirtualClient/VirtualClient.Dependencies.UnitTests/Packaging/WgetPackageInstallationTests.cs

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -50,11 +50,9 @@ public void SetupDefaults(PlatformID platform, Architecture architecture)
5050
}
5151

5252
[Test]
53-
[TestCase(PlatformID.Unix, Architecture.X64)]
54-
[TestCase(PlatformID.Unix, Architecture.Arm64)]
5553
[TestCase(PlatformID.Win32NT, Architecture.X64)]
5654
[TestCase(PlatformID.Win32NT, Architecture.Arm64)]
57-
public void WgetPackageInstallationThrowsIfTheWgetTooletPackageIsNotFound(PlatformID platform, Architecture architecture)
55+
public void WgetPackageInstallationThrowsIfTheWgetTooletPackageIsNotFoundOnWindows(PlatformID platform, Architecture architecture)
5856
{
5957
this.SetupDefaults(platform, architecture);
6058

src/VirtualClient/VirtualClient.Dependencies/Packaging/WgetPackageInstallation.cs

Lines changed: 15 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -89,20 +89,23 @@ protected override async Task ExecuteAsync(EventContext telemetryContext, Cancel
8989
{
9090
DependencyPath wgetPackage = null;
9191

92-
try
92+
if (this.Platform == PlatformID.Win32NT)
9393
{
94-
wgetPackage = await this.GetPlatformSpecificPackageAsync(WgetPackageInstallation.WgetPackageName, cancellationToken);
95-
}
96-
catch (DependencyException exc)
97-
{
98-
throw new DependencyException(
99-
$"Missing required package. The '{WgetPackageInstallation.WgetPackageName}' package does not exist. This package is expected " +
100-
$"to be included with the Virtual Client. It may be necessary to use a newer version of the Virtual Client.",
101-
exc,
102-
ErrorReason.DependencyNotFound);
103-
}
94+
try
95+
{
96+
wgetPackage = await this.GetPlatformSpecificPackageAsync(WgetPackageInstallation.WgetPackageName, cancellationToken);
97+
}
98+
catch (DependencyException exc)
99+
{
100+
throw new DependencyException(
101+
$"Missing required package. The '{WgetPackageInstallation.WgetPackageName}' package does not exist. This package is expected " +
102+
$"to be included with the Virtual Client. It may be necessary to use a newer version of the Virtual Client.",
103+
exc,
104+
ErrorReason.DependencyNotFound);
105+
}
104106

105-
telemetryContext.AddContext("wgetPackagePath", wgetPackage.Path);
107+
telemetryContext.AddContext("wgetPackagePath", wgetPackage.Path);
108+
}
106109

107110
// For windows we are using the wget we download. In Linux we are using wget from the package managers.
108111
string wgetExe = this.Platform == PlatformID.Unix ? "wget" : this.Combine(wgetPackage.Path, "wget.exe");

0 commit comments

Comments
 (0)