Bump dotnet SDK to dotnet 8. (#3500)

This commit is contained in:
Tingluo Huang
2024-10-16 12:32:51 -04:00
committed by GitHub
parent 9b3b554758
commit af8dee51e1
19 changed files with 61 additions and 46 deletions

View File

@@ -228,10 +228,12 @@ namespace GitHub.Runner.Listener
var configFile = Path.Combine(HostContext.GetDirectory(WellKnownDirectory.Root), config.Key);
var configContent = Convert.FromBase64String(config.Value);
#if OS_WINDOWS
#pragma warning disable CA1416
if (configFile == HostContext.GetConfigFile(WellKnownConfigFile.RSACredentials))
{
configContent = ProtectedData.Protect(configContent, null, DataProtectionScope.LocalMachine);
}
#pragma warning restore CA1416
#endif
File.WriteAllBytes(configFile, configContent);
File.SetAttributes(configFile, File.GetAttributes(configFile) | FileAttributes.Hidden);