Browse Source

no empty strings

pull/629/head
JT 7 months ago
parent
commit
c66c4972b8
  1. 3
      StabilityMatrix.Core/Python/PipInstallArgs.cs

3
StabilityMatrix.Core/Python/PipInstallArgs.cs

@ -31,7 +31,8 @@ public record PipInstallArgs : ProcessArgsBuilder
var requirementsEntries = requirements
.SplitLines(StringSplitOptions.TrimEntries | StringSplitOptions.RemoveEmptyEntries)
.Where(s => !s.StartsWith('#'))
.Select(s => s.Contains('#') ? s.Substring(0, s.IndexOf('#')) : s);
.Select(s => s.Contains('#') ? s.Substring(0, s.IndexOf('#')) : s)
.Where(s => !string.IsNullOrWhiteSpace(s));
if (excludePattern is not null)
{

Loading…
Cancel
Save