-
-
Notifications
You must be signed in to change notification settings - Fork 702
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
std.path: Fix tilde expansion for HOME=/ #7510
Conversation
Thanks for your pull request and interest in making D better, @kinke! We are looking forward to reviewing it, and you should be hearing from a maintainer soon.
Please see CONTRIBUTING.md for more information. If you have addressed all reviews or aren't sure how to proceed, don't hesitate to ping us with a simple comment. Bugzilla referencesYour PR doesn't reference any Bugzilla issue. If your PR contains non-trivial changes, please reference a Bugzilla issue or create a manual changelog. Testing this PR locallyIf you don't have a local development environment setup, you can use Digger to test this PR: dub run digger -- build "master + phobos#7510" |
Looks like a no-brainer. Don't you want it in stable ? Also I'm not sure copying bash's behavior for |
stable would be somewhat easier for me/LDC, but as that bug has probably been there for ages, I thought it'd be safer to target master. No strong opinion though. As to 'copying bash's behavior for ~/' - I took care of that first, but then realized that the failing test would then fail again, because it unconditionally expects an added slash compared to ~ alone. While the test can of course be adapted for this (or that whole test only exected if USER is set - although it revealed this bug), I've only later seen that bash doesn't try to get rid of duplicate dir separators at all, unlike Phobos here, so |
This also happens consistently when running the |
That's the case for CirrusCI/FreeBSD - the user is root, the
USER
env var unset andHOME
set to/
, and the tilde expansion for~
in that case led to an empty string and according failures inphobos/std/path.d
Lines 4158 to 4163 in 95e4fb4