From c66c4972b8474d705403f0cf13a6be761406a19b Mon Sep 17 00:00:00 2001 From: JT Date: Tue, 16 Apr 2024 18:21:41 -0700 Subject: [PATCH] no empty strings --- StabilityMatrix.Core/Python/PipInstallArgs.cs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/StabilityMatrix.Core/Python/PipInstallArgs.cs b/StabilityMatrix.Core/Python/PipInstallArgs.cs index 9359f4ec..558a7db8 100644 --- a/StabilityMatrix.Core/Python/PipInstallArgs.cs +++ b/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) {