-
Notifications
You must be signed in to change notification settings - Fork 95
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: Use LimaUser method instead of host user name (#712)
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 uses `lima` 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 from `LimaWrapper.LimaUser()`. *Testing done:* yes - [x] I've reviewed the guidance in CONTRIBUTING.md #### License Acceptance By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license. --------- Signed-off-by: Wataru Haibara <hwhaibarawataru@gmail.com>
- Loading branch information
Showing
3 changed files
with
111 additions
and
59 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters