mirror of
https://github.com/actions/runner.git
synced 2025-12-11 12:57:05 +00:00
Fix Null Ref Issues Composite Actions (#657)
This commit is contained in:
@@ -91,7 +91,7 @@ namespace GitHub.Runner.Worker.Handlers
|
|||||||
|
|
||||||
ProcessCompositeActionOutputs();
|
ProcessCompositeActionOutputs();
|
||||||
|
|
||||||
ExecutionContext.Global.StepsContext.ClearScope(ExecutionContext.GetFullyQualifiedContextName());
|
ExecutionContext.Global.StepsContext.ClearScope(childScopeName);
|
||||||
}
|
}
|
||||||
catch (Exception ex)
|
catch (Exception ex)
|
||||||
{
|
{
|
||||||
@@ -137,12 +137,19 @@ namespace GitHub.Runner.Worker.Handlers
|
|||||||
var outputsName = pair.Key;
|
var outputsName = pair.Key;
|
||||||
var outputsAttributes = pair.Value as DictionaryContextData;
|
var outputsAttributes = pair.Value as DictionaryContextData;
|
||||||
outputsAttributes.TryGetValue("value", out var val);
|
outputsAttributes.TryGetValue("value", out var val);
|
||||||
var outputsValue = val as StringContextData;
|
|
||||||
|
|
||||||
// Set output in the whole composite scope.
|
if (val != null)
|
||||||
if (!String.IsNullOrEmpty(outputsName) && !String.IsNullOrEmpty(outputsValue))
|
|
||||||
{
|
{
|
||||||
ExecutionContext.SetOutput(outputsName, outputsValue, out _);
|
var outputsValue = val as StringContextData;
|
||||||
|
// Set output in the whole composite scope.
|
||||||
|
if (!String.IsNullOrEmpty(outputsValue))
|
||||||
|
{
|
||||||
|
ExecutionContext.SetOutput(outputsName, outputsValue, out _);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
ExecutionContext.SetOutput(outputsName, "", out _);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user