Skip to content

cargo package / publish don't handle symlink correctly on Windows #5664

Open
@upsuper

Description

If you package a crate with symlink, the file would not be followed but be packed as a file with relative path as content. For example, if you checkout serde-rs/serde, and run cargo package in serde directory, the license files in the package directory would only have content like ../LICENSE-APACHE.

It's probably actually a problem of Git for Windows which may not checkout symlink correctly. But maybe Cargo can try harder to query the VCS for whether it's a symlink or not (e.g. use git ls-files -s).

Related issues: alexcrichton/cargo-vendor#77, #3896, #2748.

Metadata

Assignees

No one assigned

    Labels

    A-gitArea: anything dealing with gitC-feature-requestCategory: proposal for a feature. Before PR, ping rust-lang/cargo if this is not `Feature accepted`Command-packageO-windowsOS: WindowsS-needs-designStatus: Needs someone to work further on the design for the feature or fix. NOT YET accepted.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions