Skip to content

Commit f764f5d

Browse files
authored
Release 2.301.1 runner with reverting #2333 (#2384)
* Revert "split by regex (#2333)" This reverts commit 72830cf. * Release 2.301.1 runner.
1 parent e471693 commit f764f5d

File tree

5 files changed

+4
-74
lines changed

5 files changed

+4
-74
lines changed

releaseNote.md

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,6 @@
66
- New option to remove local config files (#2367)
77

88
## Bugs
9-
- Split by regex (#2333)
109
- Treat jitconfig as secret (#2335)
1110
- Add Header/Footer to multi-line message in StdoutTraceListener (#2336)
1211
- Update Node dependencies (#2381)

releaseVersion

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
2.301.0
1+
2.301.1

src/Runner.Sdk/ProcessInvoker.cs

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,6 @@
1111
using System.Threading.Channels;
1212
using System.Threading.Tasks;
1313
using GitHub.Runner.Sdk;
14-
using System.Text.RegularExpressions;
1514

1615
namespace GitHub.Runner.Sdk
1716
{
@@ -266,8 +265,8 @@ public async Task<int> ExecuteAsync(
266265
foreach (KeyValuePair<string, string> kvp in environment)
267266
{
268267
#if OS_WINDOWS
269-
string tempKey = String.IsNullOrWhiteSpace(kvp.Key) ? kvp.Key : Regex.Split(kvp.Key, @"\p{C}")[0];
270-
string tempValue = String.IsNullOrWhiteSpace(kvp.Value) ? kvp.Value : Regex.Split(kvp.Value, @"\p{C}")[0];
268+
string tempKey = String.IsNullOrWhiteSpace(kvp.Key) ? kvp.Key : kvp.Key.Split('\0')[0];
269+
string tempValue = String.IsNullOrWhiteSpace(kvp.Value) ? kvp.Value : kvp.Value.Split('\0')[0];
271270
if(!String.IsNullOrWhiteSpace(tempKey))
272271
{
273272
_proc.StartInfo.Environment[tempKey] = tempValue;

src/Test/L0/ProcessInvokerL0.cs

Lines changed: 0 additions & 68 deletions
Original file line numberDiff line numberDiff line change
@@ -164,40 +164,6 @@ public async Task SetTestEnvWithNullInKey()
164164
}
165165
}
166166

167-
[Fact]
168-
[Trait("Level", "L0")]
169-
[Trait("Category", "Common")]
170-
public async Task SetTestEnvWithTabInKey()
171-
{
172-
using (TestHostContext hc = new(this))
173-
{
174-
Tracing trace = hc.GetTrace();
175-
176-
Int32 exitCode = -1;
177-
var processInvoker = new ProcessInvokerWrapper();
178-
processInvoker.Initialize(hc);
179-
var stdout = new List<string>();
180-
var stderr = new List<string>();
181-
processInvoker.OutputDataReceived += (object sender, ProcessDataReceivedEventArgs e) =>
182-
{
183-
trace.Info(e.Data);
184-
stdout.Add(e.Data);
185-
};
186-
processInvoker.ErrorDataReceived += (object sender, ProcessDataReceivedEventArgs e) =>
187-
{
188-
trace.Info(e.Data);
189-
stderr.Add(e.Data);
190-
};
191-
192-
exitCode = await processInvoker.ExecuteAsync("", "cmd.exe", "/c \"echo %TEST%\"", new Dictionary<string, string>() { { "TEST\u0009second", "first" } }, CancellationToken.None);
193-
194-
trace.Info("Exit Code: {0}", exitCode);
195-
Assert.Equal(0, exitCode);
196-
Assert.Equal("first", stdout.First(x => !string.IsNullOrWhiteSpace(x)));
197-
198-
}
199-
}
200-
201167
[Fact]
202168
[Trait("Level", "L0")]
203169
[Trait("Category", "Common")]
@@ -231,40 +197,6 @@ public async Task SetTestEnvWithNullInValue()
231197

232198
}
233199
}
234-
235-
[Fact]
236-
[Trait("Level", "L0")]
237-
[Trait("Category", "Common")]
238-
public async Task SetTestEnvWithTabInValue()
239-
{
240-
using (TestHostContext hc = new(this))
241-
{
242-
Tracing trace = hc.GetTrace();
243-
244-
Int32 exitCode = -1;
245-
var processInvoker = new ProcessInvokerWrapper();
246-
processInvoker.Initialize(hc);
247-
var stdout = new List<string>();
248-
var stderr = new List<string>();
249-
processInvoker.OutputDataReceived += (object sender, ProcessDataReceivedEventArgs e) =>
250-
{
251-
trace.Info(e.Data);
252-
stdout.Add(e.Data);
253-
};
254-
processInvoker.ErrorDataReceived += (object sender, ProcessDataReceivedEventArgs e) =>
255-
{
256-
trace.Info(e.Data);
257-
stderr.Add(e.Data);
258-
};
259-
260-
exitCode = await processInvoker.ExecuteAsync("", "cmd.exe", "/c \"echo %TEST%\"", new Dictionary<string, string>() { { "TEST", "first\u0009second" } }, CancellationToken.None);
261-
262-
trace.Info("Exit Code: {0}", exitCode);
263-
Assert.Equal(0, exitCode);
264-
Assert.Equal("first", stdout.First(x => !string.IsNullOrWhiteSpace(x)));
265-
266-
}
267-
}
268200
#endif
269201
[Fact]
270202
[Trait("Level", "L0")]

src/runnerversion

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
2.301.0
1+
2.301.1

0 commit comments

Comments
 (0)