Skip to content

Walk up parent directories to find the current crate #620

Closed
@fitzgen

Description

@fitzgen

When there isn't any crate directory specified, we should walk up directories until we see a Cargo.toml instead of giving up if the current directory has none.

I.e. we should make the first wasm-pack test attempt below Just Work:

~/src/dodrio/examples $ wasm-pack test --firefox --headless
Error: crate directory is missing a `Cargo.toml` file; is `.` the wrong directory?

~/src/dodrio/examples $ cd ..

~/src/dodrio $ wasm-pack test --firefox --headless
[INFO]: 🎯  Checking for the Wasm target...
   Compiling futures v0.1.26
   Compiling cfg-if v0.1.7
...

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions