Skip to content

FIX: Coerce license path to pathlike #2180

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

Merged
merged 1 commit into from
Jun 7, 2020

Conversation

mgxd
Copy link
Collaborator

@mgxd mgxd commented Jun 6, 2020

#2165 dropped the conversion from str -> path-like for the wrapper's FreeSurfer license binding

@mgxd mgxd mentioned this pull request Jun 6, 2020
@@ -237,6 +237,7 @@ def __call__(self, parser, namespace, values, option_string=None):

def _is_file(path, parser):
"""Ensure a given path exists and it is a file."""
path = os.path.abspath(path)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I would suggest that we switch to return os.path.abspath(path), so that the exception matches the user input.

Feel free to disregard and merge, if you disagree. This is a good fix.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'll merge it in as is, I feel the full path to the invalid license would be helpful when debugging

@mgxd mgxd merged commit 34a0b77 into nipreps:maint/20.1.x Jun 7, 2020
@mgxd mgxd deleted the fix/wrapper-path branch June 7, 2020 18:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants