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
use join for x-plat friendly root paths #4713
Conversation
Signed-off-by: mwrock <matt@mattwrock.com>
Thanks for the pull request! Here is what will happen next:
Thank you for contributing! |
Looks correct to me! I wonder if there are other places we need to address such as https://github.com/habitat-sh/habitat/blob/master/components/sup/src/manager/mod.rs#L80 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If there are other places where we need a similar fix, can we add them to this review or file an issue to track them down? I don't want to hold up this fix and the approach looks sound.
yeah good call @baumanj . I'll see if I can scour them all up. I have a workaround in the affected plan to tide us over in the meantime. |
I took a look and this is the only one in this repo that would affect what gets leaked out of the There are certainly other paths with forward slashes constructed as the one you noted but all of those paths are consumed internally and can thus be used with confidence since we don't have arbitrary code that is prejudiced against forward slashes. |
@thesentinels approve |
🤘 I am testing your branch against master before merging it. We do this to ensure that the master branch is never failing tests. |
Travis CI has started testing this PR. |
💖 Travis CI reports this PR passed. It always makes me feel nice when humans approve of one anothers work. I'm merging this PR now. I just want you and the contributor to answer me one question: |
Thanks for taking the extra time and looking into the other possible places, @mwrock ! |
This ensures that
SVC_ROOT
andSVC_USER
file path slashes are OS native. Specifically making them backslashes on Windows.While almost all apps on windows handle forward slashes just as well as backslashes there are a few (like SQL Server 2016 (unlike 2017)) that may not understand forward slashes. This should fix those cases.
Related to habitat-sh/core#12
Signed-off-by: mwrock matt@mattwrock.com