mirror of
https://github.com/actions/runner.git
synced 2025-12-10 12:36:23 +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 readonly string StepDebug = "ACTIONS_STEP_DEBUG";
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public static class Agent
|
||||||
|
{
|
||||||
|
public static readonly string ToolsDirectory = "agent.ToolsDirectory";
|
||||||
|
}
|
||||||
|
|
||||||
public static class System
|
public static class System
|
||||||
{
|
{
|
||||||
//
|
//
|
||||||
|
|||||||
@@ -229,8 +229,9 @@ namespace GitHub.Runner.Common
|
|||||||
break;
|
break;
|
||||||
|
|
||||||
case WellKnownDirectory.Tools:
|
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))
|
if (string.IsNullOrEmpty(path))
|
||||||
{
|
{
|
||||||
path = Path.Combine(
|
path = Path.Combine(
|
||||||
|
|||||||
Reference in New Issue
Block a user