Skip to content

Incorrect path separators on Windows breaks "-tidy-changed-files" #311

@ishan-karmakar

Description

@ishan-karmakar

On Windows, root_path (from git rev-parse) returns a path with Unix path separators, and is appended onto each file from git diff. This results in files and changed_file_list having common paths, but with different separators, making the AND operation fail. The quick solution would be to use os.path.abspath on changed_file_list instead of appending root_path, or use os.path.normpath on changed_file_list after appending root_path.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions