-
Notifications
You must be signed in to change notification settings - Fork 30
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
host-mnt can be in different formats #20
base: master
Are you sure you want to change the base?
Conversation
Hi @Bazek , do you know how to build this on my local PC? I want to use this~ |
@@ -24,8 +28,8 @@ def docker_bind_to_windows_path(path): | |||
str: Converts Hyper-V mount path to Windows path (e.g. /C/some-path -> C:/some-path). | |||
|
|||
""" | |||
expr = re.compile('^(?:/host_mnt)?/([a-zA-Z])/(.*)$') | |||
match = re.match(expr, path) | |||
expr = re.compile(r'^(?:/host_mnt/|/run/desktop/mnt/host/)?([a-zA-Z]):?[/\\](.*)$') |
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.
Why not ^(?:/host_mnt|/run/desktop/mnt/host)?/([a-zA-Z]):?[/\\](.*)$
?. Otherwise we will break compatibility with old versions (e.g. expression in your PR does not match /C/some-path
)
Hoi. It'd be great if this change, or something similar, was merged into the pypi release. I hit the same issue, because |
Just came across this issue, and since many systems have different host paths, why not have some sort of flag / arguments passed through cmd while running the program. That way we can also preserve the backwards compatibility, and different paths can also be accommodated? (my path was in C:/something/something format) |
From what I observe, we have 2 cases to consider:
Assuming that the path that is passed will always be a valid path (in any format) we can modify the function to include 2 steps:
This way backwards compatibility will also be maintained, since this case covers the original case of I will create a PR for this. |
any chance the PR can be merged? I can manually modify the scripts and it works fine for me, but I'd want to pass this tool for my whole team and I'd hate to tell them to manually apply fix. |
My possible paths are: