cargo-cache icon indicating copy to clipboard operation
cargo-cache copied to clipboard

"Failed to open git repository" when fscking registries during "cargo cache -f"

Open detly opened this issue 1 year ago • 0 comments

Environment:

  • cargo-cache version 0.8.3
  • cargo version 1.82.0
  • OS: Ubuntu 24.04.1

When I run cargo cache -f in my home directory, I see:

$ cargo cache -f         

Fscking repositories. This may take some time...
Fscking '06ba4b8be83508cec7bafa80349790380684cceb-faadcb542ca26fdf'
Fscking 'calloop-1cfd03f8d23460c2'
[... snipped this out ...]
Fscking 'zola-32d34b4bad399957'

Fscking registries. This may take some time...
Fscking 'github.com-1ecc6299db9ec823'
Fscking 'index.crates.io-6f17d22bba15001f'
Failed to open git repository at "/home/jason/.cargo/registry/index/index.crates.io-6f17d22bba15001f"

Looking in the directory in question, it seems it's not a git repo at all:

$ ls -al /home/jason/.cargo/registry/index/index.crates.io-6f17d22bba15001f
total 16
drwxrwxr-x   3 jason jason 4096 Jun  2  2023 .
drwxrwxr-x   4 jason jason 4096 Jun  2  2023 ..
drwxrwxr-x 227 jason jason 4096 Nov  5 15:36 .cache
-rw-rw-r--   1 jason jason   76 Nov 26 05:50 config.json

I haven't deleted this yet, so feel free to ask for more debugging info.

detly avatar Nov 26 '24 03:11 detly