Skip to content

Commit

Permalink
fix: remove comment lines, again
Browse files Browse the repository at this point in the history
  • Loading branch information
Jeff Gordon committed Oct 2, 2024
1 parent c1d1cdc commit efcd2fd
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions lib/uv.js
Original file line number Diff line number Diff line change
Expand Up @@ -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));
Expand Down

0 comments on commit efcd2fd

Please sign in to comment.