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

`clean-deps` panics "No such file or directory"

Open ggwpez opened this issue 2 years ago • 0 comments

Reproduce:

git clone https://github.com/ggwpez/substrate-weight-compare --branch oty-panic-unleash-clean --depth 1
cd substrate-weight-compare
# Optional: proof that the project is fine:
# cargo check 
RUST_BACKTRACE=1 cargo unleash clean-deps

result:

thread 'main' panicked at 'called `Result::unwrap()` on an `Err` value: Os { code: 2, kind: NotFound, message: "No such file or directory" }', .cargo/registry/src/github.com-1ecc6299db9ec823/cargo-unleash-1.0.0-alpha.13/src/commands/clean_deps.rs:32:22
stack backtrace:
   0: rust_begin_unwind
             at /rustc/a55dd71d5fb0ec5a6a3a9e8c27b2127ba491ce52/library/std/src/panicking.rs:584:5
   1: core::panicking::panic_fmt
             at /rustc/a55dd71d5fb0ec5a6a3a9e8c27b2127ba491ce52/library/core/src/panicking.rs:142:14
   2: core::result::unwrap_failed
             at /rustc/a55dd71d5fb0ec5a6a3a9e8c27b2127ba491ce52/library/core/src/result.rs:1814:5
   3: cargo_unleash::commands::clean_deps::clean_up_unused_dependencies::{{closure}}::{{closure}}
   4: cargo_unleash::util::edit_each
   5: cargo_unleash::commands::clean_deps::clean_up_unused_dependencies
   6: cargo_unleash::cli::run
   7: cargo_unleash::main

I can probably figure that out myself but wanted to open an issue anyway.

ggwpez avatar Oct 21 '22 21:10 ggwpez