Compare commits

...

3 Commits

Author SHA1 Message Date
Ferenc Hammerl
b183ce236d Kill node process so we can print to terminal again
Fixes 'The handle is invalid' bug
2022-02-08 10:38:56 +01:00
Ferenc Hammerl
216e1b5643 Revert "Use list again instead of concurrent"
This reverts commit 44157b5234.
2022-02-07 13:59:17 +01:00
Ferenc Hammerl
44157b5234 Use list again instead of concurrent 2022-02-07 13:56:27 +01:00

View File

@@ -581,17 +581,17 @@ namespace GitHub.Runner.Listener
IOUtil.CopyDirectory(Path.Combine(latestRunnerDirectory, Constants.Path.ExternalsDirectory), externalsVersionDir, token); IOUtil.CopyDirectory(Path.Combine(latestRunnerDirectory, Constants.Path.ExternalsDirectory), externalsVersionDir, token);
// copy and replace all .sh/.cmd files // copy and replace all .sh/.cmd files
Trace.Info($"Copy any remaining .sh/.cmd files into runner root."); Trace.Info($"DISABLED");
foreach (FileInfo file in new DirectoryInfo(latestRunnerDirectory).GetFiles() ?? new FileInfo[0]) // foreach (FileInfo file in new DirectoryInfo(latestRunnerDirectory).GetFiles() ?? new FileInfo[0])
{ // {
string destination = Path.Combine(HostContext.GetDirectory(WellKnownDirectory.Root), file.Name); // string destination = Path.Combine(HostContext.GetDirectory(WellKnownDirectory.Root), file.Name);
// Removing the file instead of just trying to overwrite it works around permissions issues on linux. // // Removing the file instead of just trying to overwrite it works around permissions issues on linux.
// https://github.com/actions/runner/issues/981 // // https://github.com/actions/runner/issues/981
Trace.Info($"Copy {file.FullName} to {destination}"); // Trace.Info($"Copy {file.FullName} to {destination}");
IOUtil.DeleteFile(destination); // IOUtil.DeleteFile(destination);
file.CopyTo(destination, true); // file.CopyTo(destination, true);
} // }
stopWatch.Stop(); stopWatch.Stop();
_updateTrace.Enqueue($"CopyRunnerToRootTime: {stopWatch.ElapsedMilliseconds}ms"); _updateTrace.Enqueue($"CopyRunnerToRootTime: {stopWatch.ElapsedMilliseconds}ms");
@@ -1060,6 +1060,8 @@ namespace GitHub.Runner.Listener
arguments: $"\"{hashFilesScript.Replace("\"", "\\\"")}\"", arguments: $"\"{hashFilesScript.Replace("\"", "\\\"")}\"",
environment: env, environment: env,
requireExitCodeZero: false, requireExitCodeZero: false,
outputEncoding: null,
killProcessOnCancel: true,
cancellationToken: token); cancellationToken: token);
if (exitCode != 0) if (exitCode != 0)