Align with runc: use user's HOME when HOME is empty string
Description
Looking at runc's implementation, even when the HOME environment variable is specified, it does not add it if it's an empty string. https://github.com/opencontainers/runc/blob/v1.3.2/libcontainer/env.go#L64
However, in youki, it appeared to be set even when it's an empty string, so I made a fix to align with runc's implementation.
Type of Change
- [x] Bug fix (non-breaking change that fixes an issue)
- [ ] New feature (non-breaking change that adds functionality)
- [ ] Breaking change (fix or feature that would cause existing functionality to not work as expected)
- [ ] Documentation update
- [ ] Refactoring (no functional changes)
- [ ] Performance improvement
- [ ] Test updates
- [ ] CI/CD related changes
- [ ] Other (please describe):
Testing
- [x] Added new unit tests
- [ ] Added new integration tests
- [ ] Ran existing test suite
- [ ] Tested manually (please provide steps)
Related Issues
Fixes #
Additional Context
none
Sorry, the test failed, I'll fix it.
@bells17 Could you please resolve the conflict? I think the tests will pass if we rerun them
@bells17 ping! If you got busy with something else, and cannot work on this for now, that is ok, please let us know, so we can plan for this PR accordingly. Thanks :)
@YJDoc2 @saku3 I apologize for the delay in the corrections. I have made the corrections so that they pass the tests on GitHub Actions as well, so please check them. (I test in a local environment using Mac + DevContainer, and the tests I added this time also pass.)