Skip to content

Avoid null value being converted to "null" string in environment #1096

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

Merged
merged 1 commit into from
Feb 26, 2025

Conversation

jonahgraham
Copy link
Member

If the CDT Variable is APPEND or PREPEND, and the incoming environment did not contain that variable name, the resulting environment would have null.

For example, if PATH was not set on the incoming environment, and PATH was supposed to be prepended with /usr/bin, this method would have set PATH=/usr/bin:null

This change ensures that the delimeter + null are not prended/appended when the incoming value is null.

Note that this fixes the "null" appearing in the output on the last point in this comment #1067 (comment)

If the CDT Variable is APPEND or PREPEND, and the incoming environment
did not contain that variable name, the resulting environment would
have null.

For example, if PATH was not set on the incoming environment, and
PATH was supposed to be prepended with /usr/bin, this method
would have set PATH=/usr/bin:null

This change ensures that the delimeter + null are not prended/appended
when the incoming value is null.
Copy link

Test Results

   602 files  ±0     602 suites  ±0   13m 43s ⏱️ -17s
10 222 tests ±0  10 198 ✅ ±0  24 💤 ±0  0 ❌ ±0 
10 260 runs  ±0  10 236 ✅ ±0  24 💤 ±0  0 ❌ ±0 

Results for commit 2b42958. ± Comparison against base commit 5135c9f.

@jonahgraham
Copy link
Member Author

@betamaxbandit and I reviewed this together in a pair programming session

@jonahgraham jonahgraham merged commit 74c4844 into eclipse-cdt:main Feb 26, 2025
5 checks passed
@jonahgraham jonahgraham deleted the fix-append-prepend branch February 26, 2025 02:55
@jonahgraham jonahgraham added this to the 12.0.0 milestone Mar 7, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant