Skip to content

Inconsistent panic during cargo vendor #15875

@obsgolem

Description

@obsgolem

Problem

When running cargo vendor on stable or nightly, I inconsistently get a panic.

thread 'main' panicked at src\tools\cargo\src\cargo\ops\vendor.rs:412:45:
called `Result::unwrap()` on an `Err` value: StripPrefixError(())
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace

Steps

Minimal Cargo.toml

[package]
name = "tmp"
version = "0.1.0"
edition = "2024"

[dependencies]
regex = "1.11.1"

Run cargo vendor like 10 times and it should show up at least once.

Possible Solution(s)

No response

Notes

No response

Version

cargo 1.90.0-nightly (930b4f62c 2025-06-28)
release: 1.90.0-nightly
commit-hash: 930b4f62cfcd1f0eabdb30a56d91bf6844b739bf
commit-date: 2025-06-28
host: x86_64-pc-windows-msvc
libgit2: 1.9.0 (sys:0.20.2 vendored)
libcurl: 8.12.1-DEV (sys:0.4.80+curl-8.12.1 vendored ssl:Schannel)
os: Windows 10.0.26100 (Windows 11 Enterprise) [64-bit]

Metadata

Metadata

Assignees

No one assigned

    Labels

    C-bugCategory: bugCommand-vendorE-easyExperience: EasyO-windowsOS: WindowsS-acceptedStatus: Issue or feature is accepted, and has a team member available to help mentor or review

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions