bytecodealliance / cargo-wasi

A lightweight Cargo subcommand to build Rust code for the `wasm32-wasi` target
https://bytecodealliance.github.io/cargo-wasi/
Apache License 2.0
444 stars 29 forks source link

cargo --manifest-path doesn't work properly #123

Open obourgain opened 2 years ago

obourgain commented 2 years ago

When I run

cargo new missing_manifest_path
cargo wasi test --manifest-path missing_manifest_path/Cargo.toml

I get the following error

error: could not find `Cargo.toml` in `/private/tmp` or any parent directory
error: failed to execute "cargo" "metadata" "--no-deps" "--format-version=1"

I guess there is some kind of recognition of the flag because if I indicate just the folder and not the Cargo.toml file itself, I get

cargo wasi test --manifest-path missing_manifest_path/    // missing Cargo.toml here
error: the manifest-path must be a path to a Cargo.toml file