Cleanup FileCommands (#693)

This commit is contained in:
Thomas Boop
2020-09-04 15:35:36 -04:00
committed by GitHub
parent 3a76a2e291
commit e6eb9e381d
3 changed files with 33 additions and 24 deletions
+9 -5
View File
@@ -147,9 +147,7 @@ namespace GitHub.Runner.Worker
// Setup File Command Manager
var fileCommandManager = HostContext.CreateService<IFileCommandManager>();
// Container Action Handler will handle the conversion for Container Actions
var container = handlerData.ExecutionType == ActionExecutionType.Container ? null : ExecutionContext.Global.Container;
fileCommandManager.InitializeFiles(ExecutionContext, container);
fileCommandManager.InitializeFiles(ExecutionContext, null);
// Load the inputs.
ExecutionContext.Debug("Loading inputs");
@@ -244,8 +242,14 @@ namespace GitHub.Runner.Worker
handler.PrintActionDetails(Stage);
// Run the task.
await handler.RunAsync(Stage);
fileCommandManager.TryProcessFiles(ExecutionContext, ExecutionContext.Global.Container);
try
{
await handler.RunAsync(Stage);
}
finally
{
fileCommandManager.ProcessFiles(ExecutionContext, ExecutionContext.Global.Container);
}
}