diff --git a/src/Runner.Worker/ActionManifestManager.cs b/src/Runner.Worker/ActionManifestManager.cs index d47eb4a14..7fb1f4f1b 100644 --- a/src/Runner.Worker/ActionManifestManager.cs +++ b/src/Runner.Worker/ActionManifestManager.cs @@ -75,12 +75,7 @@ namespace GitHub.Runner.Worker // Add this file to the FileTable in executionContext if it hasn't been added already // we use > since fileID is 1 indexed - if (executionContext.FileTable == null) - { - executionContext.FileTable = new string[0]; - executionContext.FileTable.Add(fileRelativePath); - } - else if (fileId > executionContext.FileTable.Count) + if (fileId > executionContext.FileTable.Count) { executionContext.FileTable.Add(fileRelativePath); } diff --git a/src/Runner.Worker/ExecutionContext.cs b/src/Runner.Worker/ExecutionContext.cs index 4655151a4..83e47c74c 100644 --- a/src/Runner.Worker/ExecutionContext.cs +++ b/src/Runner.Worker/ExecutionContext.cs @@ -53,7 +53,7 @@ namespace GitHub.Runner.Worker Dictionary JobOutputs { get; } IDictionary EnvironmentVariables { get; } IDictionary Scopes { get; } - IList FileTable { get; set; } + IList FileTable { get; } StepsContext StepsContext { get; } DictionaryContextData ExpressionValues { get; } IList ExpressionFunctions { get; } @@ -150,7 +150,7 @@ namespace GitHub.Runner.Worker public Dictionary JobOutputs { get; private set; } public IDictionary EnvironmentVariables { get; private set; } public IDictionary Scopes { get; private set; } - public IList FileTable { get; set; } + public IList FileTable { get; private set; } public StepsContext StepsContext { get; private set; } public DictionaryContextData ExpressionValues { get; } = new DictionaryContextData(); public IList ExpressionFunctions { get; } = new List();