From efcd2fd91aca180db6cc3638e3033a94b4444eff Mon Sep 17 00:00:00 2001 From: Jeff Gordon Date: Tue, 1 Oct 2024 23:03:25 -0500 Subject: [PATCH] fix: remove comment lines, again --- lib/uv.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/lib/uv.js b/lib/uv.js index f6bdc4c9..c53bc294 100644 --- a/lib/uv.js +++ b/lib/uv.js @@ -87,15 +87,15 @@ async function uvToRequirements() { */ function removeEditableFlagFromRequirementsString(requirementBuffer) { const flagStr = '-e '; - const commentLine = '# '; + const commentLine = '#'; const lines = requirementBuffer.toString('utf8').split(EOL); const newLines = []; for (let i = 0; i < lines.length; i++) { if (lines[i].startsWith(flagStr)) { newLines.push(lines[i].substring(flagStr.length)); } - if (!lines[i].startsWith(commentLine)) { - newLines.push(lines[i]); + if (lines[i].startsWith(commentLine)) { + continue; } } return Buffer.from(newLines.join(EOL));