feat(utils): enhance ExpandTilde to support ~username#295
feat(utils): enhance ExpandTilde to support ~username#295pashkov256 merged 2 commits intopashkov256:mainfrom
Conversation
|
Hi @AliyaRazyapova! The job failed because two files are not properly gofmt formatted: internal/utils/utils.go gofmt -w internal/utils/utils.go internal/utils/utils_test.go Run and commit the formatted files, and push your changes. This will resolve the lint (gofmt) errors and allow the CI job to pass. |
|
Hi @AliyaRazyapova . Great solution, thanks for contributing to the repository!! We also have a platform where you can find issues and contribution projects: |
Description
This PR enhances the
ExpandTildefunction in theutilspackage to support expanding~usernamepaths (e.g.,~john/documents). Previously, only~(current user) was expanded correctly;~usernamewas ignored.Changes
~usernameusingos/user.Lookup()./) and Windows (\) separators.~and~/subpath~username/subpath(for existing user)Testing
Closes #115