Skip to content

Commit 382cad4

Browse files
Add assertions since parsing shellout output is quite fragile
1 parent 92fbe8a commit 382cad4

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

projects/client/Unit/src/unit/Fixtures.cs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -439,6 +439,8 @@ protected List<ConnectionInfo> ListConnections()
439439
// line: <[email protected]> 58713
440440
return lines.Select(s => {
441441
var columns = s.Split('\t');
442+
Debug.Assert(!string.IsNullOrEmpty(columns[0]), "columns[0] is null or empty!");
443+
Debug.Assert(!string.IsNullOrEmpty(columns[1]), "columns[1] is null or empty!");
442444
return new ConnectionInfo(columns[0], Convert.ToUInt32(columns[1]));
443445
}).ToList();
444446
}

0 commit comments

Comments
 (0)