Skip to content

Commit 3d25a34

Browse files
Add Red Hat base distro to supported list (#4946)
* Add Red Hat based distro (Oracle Linux) to supported list * Fix FF using bug
1 parent c2f1c4f commit 3d25a34

File tree

2 files changed

+24
-13
lines changed

2 files changed

+24
-13
lines changed

src/Agent.Listener/net8.json

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,14 @@
3434
}
3535
]
3636
},
37+
{
38+
"id": "ol",
39+
"versions": [
40+
{
41+
"name": "8+"
42+
}
43+
]
44+
},
3745
{
3846
"id": "macOS",
3947
"versions": [

src/Agent.Worker/JobExtension.cs

Lines changed: 16 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -77,24 +77,27 @@ public async Task<List<IStep>> InitializeJob(IExecutionContext jobContext, Pipel
7777

7878
PackageVersion agentVersion = new PackageVersion(BuildConstants.AgentPackage.Version);
7979

80-
// Check if a system supports .NET 8
81-
try
80+
if (!AgentKnobs.Net8UnsupportedOsWarning.GetValue(context).AsBoolean())
8281
{
83-
Trace.Verbose("Checking if your system supports .NET 8");
82+
// Check if a system supports .NET 8
83+
try
84+
{
85+
Trace.Verbose("Checking if your system supports .NET 8");
8486

85-
// Check version of the system
86-
if (!await PlatformUtil.IsNetVersionSupported("net8"))
87+
// Check version of the system
88+
if (!await PlatformUtil.IsNetVersionSupported("net8"))
89+
{
90+
string systemId = PlatformUtil.GetSystemId();
91+
SystemVersion systemVersion = PlatformUtil.GetSystemVersion();
92+
context.Warning(StringUtil.Loc("UnsupportedOsVersionByNet8", $"{systemId} {systemVersion}"));
93+
}
94+
}
95+
catch (Exception ex)
8796
{
88-
string systemId = PlatformUtil.GetSystemId();
89-
SystemVersion systemVersion = PlatformUtil.GetSystemVersion();
90-
context.Warning(StringUtil.Loc("UnsupportedOsVersionByNet8", $"{systemId} {systemVersion}"));
97+
Trace.Error($"Error has occurred while checking if system supports .NET 8: {ex}");
98+
context.Warning(ex.Message);
9199
}
92100
}
93-
catch (Exception ex)
94-
{
95-
Trace.Error($"Error has occurred while checking if system supports .NET 8: {ex}");
96-
context.Warning(ex.Message);
97-
}
98101

99102
// Set agent version variable.
100103
context.SetVariable(Constants.Variables.Agent.Version, BuildConstants.AgentPackage.Version);

0 commit comments

Comments
 (0)