mirror of
https://github.com/actions/runner.git
synced 2025-12-10 20:36:49 +00:00
Bring back tools folder fallback code (#232)
This commit is contained in:
@@ -189,6 +189,11 @@ namespace GitHub.Runner.Common
|
||||
public static readonly string StepDebug = "ACTIONS_STEP_DEBUG";
|
||||
}
|
||||
|
||||
public static class Agent
|
||||
{
|
||||
public static readonly string ToolsDirectory = "agent.ToolsDirectory";
|
||||
}
|
||||
|
||||
public static class System
|
||||
{
|
||||
//
|
||||
|
||||
@@ -229,7 +229,8 @@ namespace GitHub.Runner.Common
|
||||
break;
|
||||
|
||||
case WellKnownDirectory.Tools:
|
||||
path = Environment.GetEnvironmentVariable("RUNNER_TOOL_CACHE");
|
||||
// TODO: Coallesce to just check RUNNER_TOOL_CACHE when images stabilize
|
||||
path = Environment.GetEnvironmentVariable("RUNNER_TOOL_CACHE") ?? Environment.GetEnvironmentVariable("RUNNER_TOOLSDIRECTORY") ?? Environment.GetEnvironmentVariable("AGENT_TOOLSDIRECTORY") ?? Environment.GetEnvironmentVariable(Constants.Variables.Agent.ToolsDirectory);
|
||||
|
||||
if (string.IsNullOrEmpty(path))
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user