mirror of
https://github.com/actions/runner.git
synced 2025-12-10 12:36:23 +00:00
Resolve build errors
This commit is contained in:
@@ -61,7 +61,7 @@ namespace GitHub.Runner.Worker.Handlers
|
||||
throw new InvalidOperationException($"Invalid action type {Action.Type} for {nameof(ScriptHandler)}");
|
||||
}
|
||||
|
||||
ar multiLines = contents.Replace("\r\n", "\n").TrimEnd('\n').Split('\n');
|
||||
var multiLines = contents.Replace("\r\n", "\n").TrimEnd('\n').Split('\n');
|
||||
foreach (var line in multiLines)
|
||||
{
|
||||
// Bright Cyan color
|
||||
@@ -228,6 +228,23 @@ namespace GitHub.Runner.Worker.Handlers
|
||||
|
||||
var contents = runValue ?? string.Empty;
|
||||
|
||||
string workingDirectory = null;
|
||||
if (!Inputs.TryGetValue("workingDirectory", out workingDirectory))
|
||||
{
|
||||
// TODO: figure out how defaults interact with template later
|
||||
// for now, we won't check job.defaults if we are inside a template.
|
||||
if (string.IsNullOrEmpty(ExecutionContext.ScopeName) && ExecutionContext.JobDefaults.TryGetValue("run", out var runDefaults))
|
||||
{
|
||||
if (runDefaults.TryGetValue("working-directory", out workingDirectory))
|
||||
{
|
||||
ExecutionContext.Debug("Overwrite 'working-directory' base on job defaults.");
|
||||
}
|
||||
}
|
||||
}
|
||||
var workspaceDir = githubContext["workspace"] as StringContextData;
|
||||
workingDirectory = Path.Combine(workspaceDir, workingDirectory ?? string.Empty);
|
||||
|
||||
|
||||
string shell = null;
|
||||
if (!Inputs.TryGetValue("shell", out shell) || string.IsNullOrEmpty(shell))
|
||||
{
|
||||
@@ -363,4 +380,3 @@ namespace GitHub.Runner.Worker.Handlers
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -70,9 +70,9 @@ namespace GitHub.Runner.Worker.Handlers
|
||||
{
|
||||
// TODO
|
||||
// Runner plugin
|
||||
handler = HostContext.CreateService<ICompositeHandler>();
|
||||
handler = HostContext.CreateService<ICompositeActionHandler>();
|
||||
// handler = CompositeHandler;
|
||||
(handler as ICompositeHandler).Data = data as CompositeActionExecutionData;
|
||||
(handler as ICompositeActionHandler).Data = data as CompositeActionExecutionData;
|
||||
}
|
||||
else
|
||||
{
|
||||
|
||||
@@ -289,8 +289,8 @@ namespace GitHub.Runner.Worker
|
||||
// TODO: Maybe add EvaluateStep stuff here too?
|
||||
// TODO: INSERT CONVERTSTEPS FUNCTION HERE FOR EVALUATING STEPS
|
||||
// Maybe we don't need to do this here do we need to initialize the job?
|
||||
context.Debug("Evaluating job evaluating steps");
|
||||
var stepsEvaluation = templateEvaluator.EvaluateSteps(contextData, context, context.ExpressionFunctions);
|
||||
// context.Debug("Evaluating job evaluating steps");
|
||||
// var stepsEvaluation = templateEvaluator.EvaluateSteps(contextData, context, context.ExpressionFunctions);
|
||||
////////
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user