Skip to content
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

windows: consistent os.path.relpath() crash #17

Open
rbrewer123 opened this issue Dec 20, 2019 · 3 comments
Open

windows: consistent os.path.relpath() crash #17

rbrewer123 opened this issue Dec 20, 2019 · 3 comments

Comments

@rbrewer123
Copy link

When running on Windows, gup consistently crashes due to an exception raised by os.path.relpath(). This happens when I add a dependency that is on a separate drive letter from the drive where my Gupfile is located.

Playing around a little at the Python3 repl on both Linux and Windows, it appears Linux can generate a new relative path from anywhere in the filesystem by traversing /, so os.path.relpath() raises no exceptions for wildly different paths. On Windows, os.path.relpath() raises an exception when the drive letters are different, e.g. C: vs. H:, or when the UNC hosts are different, e.g. \\host1\foo vs. \\host2\bar.

My temporary workaround is to not add cross-drive dependencies in my project.

@timbertson
Copy link
Owner

timbertson commented Dec 20, 2019 via email

@rbrewer123
Copy link
Author

I'll work on getting a stack trace. The exception is ValueError: path is on mount 'c:', start on mount 'h:'. The underlying ntpath.relpath() raises the exception on Linux too.

@timbertson
Copy link
Owner

timbertson commented Dec 21, 2019 via email

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

No branches or pull requests

2 participants