mirror of
https://github.com/actions/runner.git
synced 2025-12-16 15:06:49 +00:00
add FF and second hashFiles functions
This commit is contained in:
@@ -29,6 +29,8 @@ namespace GitHub.Runner.Worker.Expressions
|
||||
githubContext.TryGetValue(PipelineTemplateConstants.Workspace, out var workspace);
|
||||
var workspaceData = workspace as StringContextData;
|
||||
ArgUtil.NotNull(workspaceData, nameof(workspaceData));
|
||||
var executionContext = templateContext.State[nameof(IExecutionContext)] as IExecutionContext;
|
||||
ArgUtil.NotNull(executionContext, nameof(executionContext));
|
||||
|
||||
string githubWorkspace = workspaceData.Value;
|
||||
bool followSymlink = false;
|
||||
@@ -64,7 +66,14 @@ namespace GitHub.Runner.Worker.Expressions
|
||||
string runnerRoot = new DirectoryInfo(binDir).Parent.FullName;
|
||||
|
||||
string node = Path.Combine(runnerRoot, "externals", NodeUtil.GetInternalNodeVersion(), "bin", $"node{IOUtil.ExeExtension}");
|
||||
string hashFilesScript = Path.Combine(binDir, "hashFiles");
|
||||
//Feature flag to fetch a new version of hashFiles script
|
||||
string hashFilesScript = string.Empty;
|
||||
var isGlobHashFilesEnabled = executionContext.Global.Variables.GetBoolean("DistributedTask.UseGlobHashFiles") ?? false;
|
||||
if(isGlobHashFilesEnabled){
|
||||
hashFilesScript = Path.Combine(binDir, "hashFilesV2");
|
||||
}
|
||||
hashFilesScript = Path.Combine(binDir, "hashFiles");
|
||||
|
||||
var hashResult = string.Empty;
|
||||
var p = new ProcessInvoker(new HashFilesTrace(context.Trace));
|
||||
p.ErrorDataReceived += ((_, data) =>
|
||||
|
||||
Reference in New Issue
Block a user