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
Add support for $CARGO_HOME in servobuild #5168
Conversation
Critic review: https://critic.hoppipolla.co.uk/r/4202 This is an external review system which you may optionally use for the code review of your pull request. In order to help critic track your changes, please do not make in-place history rewrites (e.g. via |
@@ -51,6 +51,10 @@ class CommandBase(object): | |||
def __init__(self, context): | |||
self.context = context | |||
|
|||
def resolverelative(category, key): | |||
if self.config[category][key].startswith("./"): |
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.
path.join
already ignore arguments before one that is an absolute path: path.join('/foo', 'bar') == '/foo/bar', path.join('/foo', '/bar') == '/bar'
. Why special-casing ./
?
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.
We also want to handle ~
.
I'll handle ~
replacement first, then do path.join
.
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.
You want to call os.path.expanduser
first.
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.
fixed
Looks good. |
No description provided.