Skip to content

Return an error when Cargo.toml is missing#2811

Open
Kuhai9801 wants to merge 1 commit into
openvm-org:mainfrom
Kuhai9801:manifest-missing-error
Open

Return an error when Cargo.toml is missing#2811
Kuhai9801 wants to merge 1 commit into
openvm-org:mainfrom
Kuhai9801:manifest-missing-error

Conversation

@Kuhai9801
Copy link
Copy Markdown

Summary

find_manifest_dir currently panics if it walks up to the filesystem root without finding a Cargo.toml, because it unwraps Path::parent().

This changes that path to return a normal eyre error instead, matching the function's Result return type.

Testing

  • cargo test -p cargo-openvm --lib find_manifest_dir --no-default-features
  • cargo check -p cargo-openvm --no-default-features
  • git diff --check
  • rustfmt --check crates/cli/src/util.rs

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant