Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Walk up parent directories to find the current crate #620

Closed
fitzgen opened this issue Apr 5, 2019 · 2 comments
Closed

Walk up parent directories to find the current crate #620

fitzgen opened this issue Apr 5, 2019 · 2 comments
Assignees
Labels
current release current todo items enhancement New feature or request PR attached there's a PR open for this issue
Milestone

Comments

@fitzgen
Copy link
Member

fitzgen commented Apr 5, 2019

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
...
@ashleygwilliams
Copy link
Member

i agree and i wish cargo fmt did this every day <3

@ashleygwilliams
Copy link
Member

closed by #624

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
current release current todo items enhancement New feature or request PR attached there's a PR open for this issue
Projects
None yet
Development

No branches or pull requests

2 participants