Skip to content

Commit efcd2fd

Browse files
author
Jeff Gordon
committed
fix: remove comment lines, again
1 parent c1d1cdc commit efcd2fd

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

lib/uv.js

+3-3
Original file line numberDiff line numberDiff line change
@@ -87,15 +87,15 @@ async function uvToRequirements() {
8787
*/
8888
function removeEditableFlagFromRequirementsString(requirementBuffer) {
8989
const flagStr = '-e ';
90-
const commentLine = '# ';
90+
const commentLine = '#';
9191
const lines = requirementBuffer.toString('utf8').split(EOL);
9292
const newLines = [];
9393
for (let i = 0; i < lines.length; i++) {
9494
if (lines[i].startsWith(flagStr)) {
9595
newLines.push(lines[i].substring(flagStr.length));
9696
}
97-
if (!lines[i].startsWith(commentLine)) {
98-
newLines.push(lines[i]);
97+
if (lines[i].startsWith(commentLine)) {
98+
continue;
9999
}
100100
}
101101
return Buffer.from(newLines.join(EOL));

0 commit comments

Comments
 (0)