-
-
Notifications
You must be signed in to change notification settings - Fork 33k
util: fix parseEnv incorrectly splitting multiple ‘=‘ in value #57421
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
Review requested:
|
Previously, parseEnv would create multiple environment variables if a single line contained multiple ‘=‘ characters (e.g. A=B=C would become { A: ‘B=C’, B: ‘C’ }). This commit ensures that only the first ‘=‘ is used as the key-value delimiter, and the rest of the line is treated as the value. Fixes: nodejs#57411
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #57421 +/- ##
==========================================
- Coverage 90.23% 90.23% -0.01%
==========================================
Files 630 629 -1
Lines 185219 184859 -360
Branches 36248 36215 -33
==========================================
- Hits 167140 166811 -329
+ Misses 11048 11018 -30
+ Partials 7031 7030 -1
🚀 New features to boost your workflow:
|
This comment was marked as off-topic.
This comment was marked as off-topic.
Co-authored-by: Antoine du Hamel <[email protected]>
Co-authored-by: Antoine du Hamel <[email protected]>
Also, we should keep a test case for the unquoted version |
c7267a5
to
255c299
Compare
I have incorporated all the review comments and added the corresponding test cases. Please let me know if there are any further suggestions or improvements needed. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
lgtm
Landed in e6a0d77 |
Previously, parseEnv would create multiple environment variables if a single line contained multiple ‘=‘ characters (e.g. A=B=C would become { A: ‘B=C’, B: ‘C’ }). This commit ensures that only the first ‘=‘ is used as the key-value delimiter, and the rest of the line is treated as the value. Fixes: nodejs#57411 PR-URL: nodejs#57421 Reviewed-By: Daniel Lemire <[email protected]> Reviewed-By: Matteo Collina <[email protected]>
Previously, parseEnv would create multiple environment variables if a single line contained multiple ‘=‘ characters (e.g. A=B=C would become { A: ‘B=C’, B: ‘C’ }). This commit ensures that only the first ‘=‘ is used as the key-value delimiter, and the rest of the line is treated as the value. Fixes: #57411 PR-URL: #57421 Reviewed-By: Daniel Lemire <[email protected]> Reviewed-By: Matteo Collina <[email protected]>
Previously, parseEnv would create multiple environment variables if a single line contained multiple ‘=‘ characters (e.g. A=B=C would become { A: ‘B=C’, B: ‘C’ }). This commit ensures that only the first ‘=‘ is used as the key-value delimiter, and the rest of the line is treated as the value. Fixes: #57411 PR-URL: #57421 Reviewed-By: Daniel Lemire <[email protected]> Reviewed-By: Matteo Collina <[email protected]>
Previously, parseEnv would create multiple environment variables if a single line contained multiple ‘=‘ characters (e.g. A=B=C would become { A: ‘B=C’, B: ‘C’ }). This commit ensures that only the first ‘=‘ is used as the key-value delimiter, and the rest of the line is treated as the value. Fixes: #57411 PR-URL: #57421 Reviewed-By: Daniel Lemire <[email protected]> Reviewed-By: Matteo Collina <[email protected]>
Previously, parseEnv would create multiple environment variables if a single line contained multiple ‘=‘ characters (e.g. A=B=C would become { A: ‘B=C’, B: ‘C’ }). This commit ensures that only the first ‘=‘ is used as the key-value delimiter, and the rest of the line is treated as the value. Fixes: #57411 PR-URL: #57421 Reviewed-By: Daniel Lemire <[email protected]> Reviewed-By: Matteo Collina <[email protected]>
Previously, parseEnv would create multiple environment variables if a single line contained multiple ‘=‘ characters (e.g. A=B=C would become { A: ‘B=C’, B: ‘C’ }). This commit ensures that only the first ‘=‘ is used as the key-value delimiter, and the rest of the line is treated as the value. Fixes: #57411 PR-URL: #57421 Reviewed-By: Daniel Lemire <[email protected]> Reviewed-By: Matteo Collina <[email protected]>
Previously, parseEnv would create multiple environment variables if a single line contained multiple ‘=‘ characters (e.g. A=B=C would become { A: ‘B=C’, B: ‘C’ }). This commit ensures that only the first ‘=‘ is used as the key-value delimiter, and the rest of the line is treated as the value. Fixes: #57411 PR-URL: #57421 Reviewed-By: Daniel Lemire <[email protected]> Reviewed-By: Matteo Collina <[email protected]>
Previously, parseEnv would create multiple environment variables if a single line contained multiple ‘=‘ characters (e.g. A=B=C would become { A: ‘B=C’, B: ‘C’ }). This commit ensures that only the first ‘=‘ is used as the key-value delimiter, and the rest of the line is treated as the value. Fixes: #57411 PR-URL: #57421 Reviewed-By: Daniel Lemire <[email protected]> Reviewed-By: Matteo Collina <[email protected]>
Previously, parseEnv would create multiple environment variables if a single line contained multiple ‘=‘ characters (e.g. A=B=C would become { A: ‘B=C’, B: ‘C’ }). This commit ensures that only the first ‘=‘ is used as the key-value delimiter, and the rest of the line is treated as the value. Fixes: #57411 PR-URL: #57421 Reviewed-By: Daniel Lemire <[email protected]> Reviewed-By: Matteo Collina <[email protected]>
Previously, parseEnv would create multiple environment variables if a single line contained multiple ‘=‘ characters (e.g. A=B=C would become { A: ‘B=C’, B: ‘C’ }). This commit ensures that only the first ‘=‘ is used as the key-value delimiter, and the rest of the line is treated as the value. Fixes: #57411 PR-URL: #57421 Reviewed-By: Daniel Lemire <[email protected]> Reviewed-By: Matteo Collina <[email protected]>
Previously, parseEnv would create multiple environment variables if a single line contained multiple ‘=‘ characters (e.g. A=B=C would become { A: ‘B=C’, B: ‘C’ }). This commit ensures that only the first ‘=‘ is used as the key-value delimiter, and the rest of the line is treated as the value. Fixes: #57411 PR-URL: #57421 Reviewed-By: Daniel Lemire <[email protected]> Reviewed-By: Matteo Collina <[email protected]>
Previously, parseEnv would create multiple environment variables if a single line contained multiple ‘=‘ characters (e.g. A=B=C would become { A: ‘B=C’, B: ‘C’ }). This commit ensures that only the first ‘=‘ is used as the key-value delimiter, and the rest of the line is treated as the value. Fixes: #57411 PR-URL: #57421 Reviewed-By: Daniel Lemire <[email protected]> Reviewed-By: Matteo Collina <[email protected]>
Previously, parseEnv would create multiple environment variables if a single line contained multiple ‘=‘ characters (e.g. A=B=C would become { A: ‘B=C’, B: ‘C’ }). This commit ensures that only the first ‘=‘ is used as the key-value delimiter, and the rest of the line is treated as the value. Fixes: #57411 PR-URL: #57421 Reviewed-By: Daniel Lemire <[email protected]> Reviewed-By: Matteo Collina <[email protected]>
Previously, parseEnv would create multiple environment variables if a single line contained multiple ‘=‘ characters (e.g. A=B=C would become { A: ‘B=C’, B: ‘C’ }). This commit ensures that only the first ‘=‘ is used as the key-value delimiter, and the rest of the line is treated as the value. Fixes: #57411 PR-URL: #57421 Reviewed-By: Daniel Lemire <[email protected]> Reviewed-By: Matteo Collina <[email protected]>
Previously, parseEnv would create multiple environment variables if a single line contained multiple ‘=‘ characters (e.g. A=B=C would become { A: ‘B=C’, B: ‘C’ }). This commit ensures that only the first ‘=‘ is used as the key-value delimiter, and the rest of the line is treated as the value. Fixes: #57411 PR-URL: #57421 Reviewed-By: Daniel Lemire <[email protected]> Reviewed-By: Matteo Collina <[email protected]>
Previously, parseEnv would create multiple environment variables if a single line contained multiple ‘=‘ characters (e.g. A=B=C would become { A: ‘B=C’, B: ‘C’ }). This commit ensures that only the first ‘=‘ is used as the key-value delimiter, and the rest of the line is treated as the value. Fixes: #57411 PR-URL: #57421 Reviewed-By: Daniel Lemire <[email protected]> Reviewed-By: Matteo Collina <[email protected]>
Previously, parseEnv would create multiple environment variables if a single line contained multiple ‘=‘ characters (e.g. A=B=C would become { A: ‘B=C’, B: ‘C’ }). This commit ensures that only the first ‘=‘ is used as the key-value delimiter, and the rest of the line is treated as the value. Fixes: #57411 PR-URL: #57421 Reviewed-By: Daniel Lemire <[email protected]> Reviewed-By: Matteo Collina <[email protected]>
Previously, parseEnv would create multiple environment variables if a single line contained multiple ‘=‘ characters (e.g. A=B=C would become { A: ‘B=C’, B: ‘C’ }). This commit ensures that only the first ‘=‘ is used as the key-value delimiter, and the rest of the line is treated as the value. Fixes: #57411 PR-URL: #57421 Reviewed-By: Daniel Lemire <[email protected]> Reviewed-By: Matteo Collina <[email protected]>
Previously, parseEnv would create multiple environment variables if a single line contained multiple ‘=‘ characters (e.g. A=B=C would become { A: ‘B=C’, B: ‘C’ }). This commit ensures that only the first ‘=‘ is used as the key-value delimiter, and the rest of the line is treated as the value. Fixes: #57411 PR-URL: #57421 Reviewed-By: Daniel Lemire <[email protected]> Reviewed-By: Matteo Collina <[email protected]>
Previously, parseEnv would create multiple environment variables if a single line contained multiple ‘=‘ characters (e.g. A=B=C would become { A: ‘B=C’, B: ‘C’ }). This commit ensures that only the first ‘=‘ is used as the key-value delimiter, and the rest of the line is treated as the value. Fixes: #57411 PR-URL: #57421 Reviewed-By: Daniel Lemire <[email protected]> Reviewed-By: Matteo Collina <[email protected]>
Previously, parseEnv would create multiple environment variables if a single line contained multiple ‘=‘ characters (e.g. A=B=C would become { A: ‘B=C’, B: ‘C’ }).
This commit ensures that only the first ‘=‘ is used as the key-value delimiter, and the rest of the line is treated as the value.
Fixes: #57411