mirror of
https://github.com/actions/runner.git
synced 2025-12-13 00:36:29 +00:00
Issue 1596: Runner throws null ref exception when new line after EOF is missing (#1687)
* Issue 1596: runner throws nullref exception when writting env var * Adding tests for missing new line after EOF marker * Changing newline to new line
This commit is contained in:
@@ -181,6 +181,10 @@ namespace GitHub.Runner.Worker
|
||||
{
|
||||
throw new Exception($"Invalid environment variable value. Matching delimiter not found '{delimiter}'");
|
||||
}
|
||||
if (newline == null)
|
||||
{
|
||||
throw new Exception($"Invalid environment variable value. EOF marker missing new line.");
|
||||
}
|
||||
endIndex = index - newline.Length;
|
||||
tempLine = ReadLine(text, ref index, out newline);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user