-
Notifications
You must be signed in to change notification settings - Fork 79
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
feat(cmds): #11 support running any cargo cmd(s) #18
Conversation
I'd prefer to have either the syntax The
as what was proposed originally in #11. With this feature, it also makes no sense to have the Finally, add yourself to the Cargo.toml :) |
@@ -54,3 +54,17 @@ pub fn run(cmd: &str) { | |||
Err(e) => println!("Failed to execute 'cargo {}': {}", cmd, e) | |||
}; | |||
} | |||
|
|||
/// Runs cargo by passing through a set of multiple commands and displays the output. | |||
pub fn run_raw(cmds: &str) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Given above comment above obsoleting the --<action>
options, run_raw
could simply replace run
. Simply add a check (in compile.rs) that if cmd
is empty or only whitespace, replace it with build test
.
Given above comments, this will be a breaking change, bringing us to v3. |
Thanks for the comments! I agree that makes sense. I'll incorporate those changes. |
I've updated the PR, much simpler logic now! |
Add support for running arbitrary cargo commands. For example, `cargo watch "test ex_ —release"` will run `cargo test ex_ —release`. Also supports multiple arguments: `cargo watch "build --release" "test test_"` will run `cargo build --release` followed by `cargo test test_`. If no arguments are given, default stays as-is: cargo build and cargo test. [breaking-change]
Support running any cargo command Closes #11.
Sorry for the wait, holidays :) |
No worries, thanks! |
Add support for running arbitrary cargo commands.
For example:
cargo watch "test ex_ —release"
will run
cargo test ex_ —release
.Also supports multiple arguments:
cargo watch build test
will run
cargo build
followed bycargo test
.I've been using this for the last few days and haven't run into any issues.
Let me know any changes and I'll incorporate.