File tree Expand file tree Collapse file tree 1 file changed +5
-5
lines changed Expand file tree Collapse file tree 1 file changed +5
-5
lines changed Original file line number Diff line number Diff line change @@ -89,16 +89,16 @@ function removeEditableFlagFromRequirementsString(requirementBuffer) {
89
89
const flagStr = '-e ' ;
90
90
const commentLine = '#' ;
91
91
const lines = requirementBuffer . toString ( 'utf8' ) . split ( EOL ) ;
92
- const newLines = [ ] ;
92
+ let updatedLines = [ ] ;
93
93
for ( let i = 0 ; i < lines . length ; i ++ ) {
94
94
if ( lines [ i ] . startsWith ( flagStr ) ) {
95
- newLines . push ( lines [ i ] . substring ( flagStr . length ) ) ;
95
+ updatedLines . push ( lines [ i ] . substring ( flagStr . length ) ) ;
96
96
}
97
- if ( lines [ i ] . startsWith ( commentLine ) ) {
98
- continue ;
97
+ if ( ! lines [ i ] . startsWith ( commentLine ) ) {
98
+ updatedLines . push ( lines [ i ] ) ;
99
99
}
100
100
}
101
- return Buffer . from ( newLines . join ( EOL ) ) ;
101
+ return Buffer . from ( updatedLines . join ( EOL ) ) ;
102
102
}
103
103
104
104
module . exports = { uvToRequirements } ;
You can’t perform that action at this time.
0 commit comments