Skip to content

[bug] Fails to remove symlink on windows #251

@sigmuha

Description

@sigmuha

When using the bender clone command on Windows, it fails to remove the "old" checked out dependency's symlink:

error: Failed to remove symlink at path "XX". Access is denied. (os error 5)

As I understand it, symlinks on windows need to be removed with std::fs::remove_dir(path) and not std::fs::remove_file(path), which can be seen in src/cli.rs

std::fs::remove_file(path).map_err(|cause| {

and src/cmd/clone.rs

std::fs::remove_file(link_path).map_err(|cause| {

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