sp1 icon indicating copy to clipboard operation
sp1 copied to clipboard

Provide a user-friendly error message when Cargo.toml is not found

Open imotai opened this issue 9 months ago • 1 comments

Description:

When running cargo-prove prove build and Cargo.toml is not found in the current directory or any parent directory, the current error message is:

thread 'main' panicked at cli/src/build.rs:27:40:
called `Result::unwrap()` on an `Err` value: CargoMetadata { stderr: "error: could not find `Cargo.toml` in `/mnt/ssd3/opensource` or any parent directory\n" }
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace

Suggestion:

Instead of the current error message, we can follow the error message from cargo build

error: could not find `Cargo.toml` in `/mnt/ssd3/opensource` or any parent directory

Related code https://github.com/succinctlabs/sp1/blob/f50fb1c3b11993fa926c128b1d38db7af969ef51/cli/src/build.rs#L25-L28

imotai avatar May 14 '24 06:05 imotai

Hi...I'd like to work on this issue

varun-doshi avatar Jun 02 '24 06:06 varun-doshi

@varun-doshi its been a while so I decided to stab, hope its ok

4rgon4ut avatar Aug 30 '24 21:08 4rgon4ut