Skip to content

cargo install should upgrade or ignore, right? #13295

@frederikhors

Description

@frederikhors

Problem

After #7560 I thought that cargo install foo should upgrade or ignore foo if already installed and instead cargo gives me this error:

cargo install foo
    Updating crates.io index
error: binary `cargo-install-foo.exe` already exists in destination
binary `cargo-install-foo.exe` already exists in destination
Add --force to overwrite

Why?

Version

cargo 1.75.0 (1d8b05cdd 2023-11-20)
release: 1.75.0
commit-hash: 1d8b05cdd1287c64467306cf3ca2c8ac60c11eb0
commit-date: 2023-11-20
host: x86_64-pc-windows-msvc
libgit2: 1.7.1 (sys:0.18.1 vendored)
libcurl: 8.4.0-DEV (sys:0.4.68+curl-8.4.0 vendored ssl:Schannel)
os: Windows 10 (Windows 10 Pro) [64-bit]

Metadata

Metadata

Assignees

No one assigned

    Labels

    C-bugCategory: bugS-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