cargo-local-registry icon indicating copy to clipboard operation
cargo-local-registry copied to clipboard

Cannot sync when using multiple crate registries

Open decryphe opened this issue 1 year ago • 1 comments

In our company we have an internal crate registry for some internal libs that are made available this way. It's configured in ~/.cargo/config.toml and any dependencies located there refer to the name of that registry.

In the config file:

[registries]
company = { index = "ssh://[email protected]/libraries/rs/index.git" }

And in any Cargo.toml files:

...
[dependencies]
...
some-crate = { version = "*", registry = "company" }
...

When running cargo local-registry --sync Cargo.lock cargo-cache I get the following output:

error: failed to sync

Caused by:
  failed to copy `/home/decryphe/.cargo/registry/cache/github.com-1ecc6299db9ec823/some-crate-1.1.0.crate` to `/home/decryphe/repos/project/cargo-cache/some-crate-1.1.0.crate`

Caused by:
  No such file or directory (os error 2)

The file it should retrieve is located at /home/decryphe/.cargo/registry/cache/git.company.com-0c110f7961c08028/some-crate-1.1.0.crate.

I'm using version cargo-local-registry version 0.2.3.

decryphe avatar Apr 12 '23 11:04 decryphe