Use Directory.EnumerateFiles instead of Directory.GetFiles in WhichUtil. (#2882)

* Use Directory.EnumerateFiles instead of Directory.GetFiles in WhichUtil.

* .

* .
This commit is contained in:
Tingluo Huang
2023-09-26 16:49:15 -04:00
committed by GitHub
parent bf445e2750
commit 8f1c070506
4 changed files with 409 additions and 10 deletions

View File

@@ -69,6 +69,8 @@ namespace GitHub.Runner.Common
public static readonly OSPlatform Platform = OSPlatform.OSX;
#elif OS_WINDOWS
public static readonly OSPlatform Platform = OSPlatform.Windows;
#else
public static readonly OSPlatform Platform = OSPlatform.Linux;
#endif
#if X86
@@ -79,6 +81,8 @@ namespace GitHub.Runner.Common
public static readonly Architecture PlatformArchitecture = Architecture.Arm;
#elif ARM64
public static readonly Architecture PlatformArchitecture = Architecture.Arm64;
#else
public static readonly Architecture PlatformArchitecture = Architecture.X64;
#endif
public static readonly TimeSpan ExitOnUnloadTimeout = TimeSpan.FromSeconds(30);