Closed w-haibara closed 10 months ago
@vsiravar Thanks for review! I added a test in nerdctl_config_applier_test.go when local user is not a valid linux username.
I have also made additional changes. I would appreciate it if you would review again.
Thank you for merge it!
Issue #, if available: #399
Description of changes: In
nerdctl_config_applier.go
, editing.bashrc
uses a file path based on the host's username. However, if the host's username contains.
or@
, lima useslima
as the username instead of the host's username. (ref: https://github.com/lima-vm/lima/blob/a8c703bf8b66d213d00542ef68271cd7b73612ef/pkg/osutil/user.go#L114-L119) Therefore, if the host's user name contains.
or@
, editing.bashrc
fails. This PR fixes this so that you can get the actual username fromLimaWrapper.LimaUser()
.Testing done: yes
License Acceptance
By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.