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

Is it possible to run command (e.g. cargo tree) in rust-script script project directory ? #60

Closed
gwpl opened this issue Jan 14, 2023 · 1 comment

Comments

@gwpl
Copy link

gwpl commented Jan 14, 2023

Is it possible to run command (e.g. cargo tree) in rust-script script project directory ?
Otherwise, could support for it be added?

(sometimes running commands inside project directory is very helpful, e.g. for debugging, and having convenient way to run them, or to jump there => e.g. rust-script to print directory path, so one could do cd "$(rust-script --project-dir script.ers) could be very handy!

@fornwall
Copy link
Owner

Version 0.23.0 has just been released.

There the -p/--project parameter can be used to generate the package and print the package path, without doing any build step.

This allows things such as cargo tree --manifest-path $(rust-script -p test.rs)/Cargo.toml or cd "$(rust-script --package script.ers).

Let me know how it works!

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

No branches or pull requests

2 participants