youki icon indicating copy to clipboard operation
youki copied to clipboard

Align with runc: use user's HOME when HOME is empty string

Open bells17 opened this issue 3 months ago • 3 comments

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

bells17 avatar Oct 06 '25 07:10 bells17

Sorry, the test failed, I'll fix it.

bells17 avatar Oct 17 '25 08:10 bells17

@bells17 Could you please resolve the conflict? I think the tests will pass if we rerun them

saku3 avatar Nov 09 '25 07:11 saku3

@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 avatar Dec 02 '25 05:12 YJDoc2

@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.)

bells17 avatar Dec 23 '25 06:12 bells17