Uh oh!
There was an error while loading. Please reload this page.
util: fix parseEnv handling of invalid lines - #57798
Conversation
nodejs-github-bot
commented
Apr 8, 2025
Review requested:
|
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
| // The value pair should be `value` | ||
| if (hash_character != std::string_view::npos) { | ||
| value = content.substr(0, hash_character); | ||
| value = value.substr(0, hash_character); |
There was a problem hiding this comment.
Why did you make this change? Please add a test that covers this.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@## main #57798 +/- ##
==========================================
- Coverage 90.23% 90.23% -0.01%
==========================================
Files 630 630 Lines 185288 185294 +6 Branches 36344 36341 -3 ==========================================
- Hits 167203 167202 -1 - Misses 11006 11017 +11 + Partials 7079 7075 -4
🚀 New features to boost your workflow:
|
AugustinMauroy
commented
Apr 8, 2025
I had added some test case for |
This comment was marked as outdated.
This comment was marked as outdated.
This comment was marked as outdated.
This comment was marked as outdated.
| // Returns an empty string_view if the input is empty. | ||
| // Example: | ||
| // trim_spaces(" hello ") -> "hello" | ||
| // trim_spaces("") -> "" |
There was a problem hiding this comment.
Not new to this PR but it occurs to me that this function overlooks the often-overlooked vertical tab (0x0B).
There was a problem hiding this comment.
I maybe can help on that, but I don't know what your are talking about
nodejs-github-bot
commented
Apr 21, 2025
Landed in 64d9b7c |
This PR fixes an issue with
util.parseEnv()where invalid lines in the input were being incorrectly concatenated into key names instead of being skipped. The fix ensures that lines without an equals sign are properly skipped during parsingFixes: #56775
I lost my old pr due to a git failure 😅
#56778