find-python.js pretty print PATH env var #11
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.
Checklist
npm install && npm test
passesDescription of change
This is optional addition to nodejs#2428
Sometimes
PATH
environment variable may contain important information to fix issue as was in nodejs#2381. But now this var printed as very long string which is really hard to read and understand. So the propose of this PR is to pretty printPATH
environment variable.The way this goal is achived is the next: just split the string by comma and represent it as array.
The edge case is do we really need to preserve the exectly original value (the whole string) because representing as array may confuse an end user. Just in case, I added warning message on top of an erray that it is only representation and real value is just a string.
Another way to solve the problem is to provide both representations or make representation switchable by e.g. CLI flag