Repository navigation
fix(man-page): keep the last environment variable when its section ends the input - #1202
Merged
Merged
Conversation
…ds the input When nothing follows the environment variables section, findIndex returns -1 and slice(start, -1) drops the last entry. Read to the end of the input in that case. Fixes nodejs#1198 Signed-off-by: kgeminicdev <kurtgeminicb@gmail.com>
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
avivkeller
approved these changes
Oct 30, 2026
ovflowd
approved these changes
Oct 30, 2026
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #1202 +/- ##
==========================================
+ Coverage 93.56% 93.74% +0.18%
==========================================
Files 287 288 +1
Lines 28577 28637 +60
Branches 2882 2894 +12
==========================================
+ Hits 26737 26846 +109
+ Misses 1818 1769 -49
Partials 22 22 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
Contributor
|
Member
|
Thank you @kgeminicdev for your first time contribution!! |
This branch was successfully deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
When nothing follows the environment variables section,
findIndexreturns-1andslice(environmentStart + 1, -1)drops the last variable. The section now runs to the end of the input in that case.Validation
Added
man-page/__tests__/generate.test.mjswith the input from #1198 (expects all three variables), plus a case where another##follows the section to check it still stops there. I couldn't run the suite locally; relying on CI here.Related Issues
Fixes #1198
Check List
node --run testand all tests passed.node --run format:check&node --run lint.