Skip to content

Bug: target argument is not passed to the inner fetch command call, producing cache mismatch #797

@psandana

Description

@psandana

Describe the bug

If on any project I execute:

 cargo fetch --locked --target x86_64-pc-windows-msvc

and then,

 cargo deny --locked --offline --target x86_64-pc-windows-msvc --all-features check bans --disable-fetch

I got errors like this one:

error: failed to download `wasm-bindgen v0.2.104`

Caused by:
  attempting to make an HTTP request, but --offline was specified

Seems that --target is not propagated to the inner fetch command execution. If I'm on the same host than the target, I would expect to not matter, but it seems it does matter.

If later, I execute:

cargo fetch --locked # no --target here

and then retry:

 cargo deny --locked --offline --target x86_64-pc-windows-msvc --all-features check bans --disable-fetch

It succeeds!

To reproduce

 cargo fetch --locked --target x86_64-pc-windows-msvc

and then,

 cargo deny --locked --offline --target x86_64-pc-windows-msvc --all-features check bans --disable-fetch

cargo-deny version

0.18.5

What OS were you running cargo-deny on?

Windows

Additional context

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions