rust-fuzz / cargo-fuzz

Command line helpers for fuzzing
https://rust-fuzz.github.io/book/cargo-fuzz.html
Apache License 2.0
1.48k stars 108 forks source link

Confusing error when `fuzz` subdir exists #341

Closed novafacing closed 1 year ago

novafacing commented 1 year ago

If you run cargo fuzz init in a crate where fuzz already exists, you get:

Error: could not find a cargo project

There should probably be an error for this specifically.

fitzgen commented 1 year ago

Agreed that we should have a better error/UX here. Would be very receptive to PRs that implemented this.

novafacing commented 1 year ago

Sure, happy to implement 🙂 consider me assigned.

novafacing commented 1 year ago

It looks like I might have had an old version, because now I see:

Error: failed to create directory /tmp/testlib/fuzz

Caused by:
    File exists (os error 17)

This seems fine, so maybe we can close this :)

fitzgen commented 1 year ago

Indeed. Thanks for filing an issue anyways!