Skip to content

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

@rbrewer123

Description

@rbrewer123

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions