Skip to content

Support ~ in path for dependencies #12874

Open
@Wasabi375

Description

@Wasabi375

Problem

I would like to specify a dependency relative to my home directory. At the moment I would need to specify the home directory as a full path which is platform dependent, e.g Linux

my_dep = { path = "/home/name/rust/my_dep" }

Proposed Solution

Most shells expand ~ into the current users home directory. It would be nice if cargo could do the same.

my_dep = { path = "~/rust/my_dep" }

That would than be expanded into the user home directory.

Notes

Currently ~/something is resolved to project-dir/~/something which is obviously not what is intended by the user.

Also looking through existing issues, this might be the same as #12873

Metadata

Metadata

Assignees

No one assigned

    Labels

    A-crate-dependenciesArea: [dependencies] of any kindC-feature-requestCategory: proposal for a feature. Before PR, ping rust-lang/cargo if this is not `Feature accepted`S-triageStatus: This issue is waiting on initial triage.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions