Skip to content

Commit

Permalink
Merge #445
Browse files Browse the repository at this point in the history
445: Add cross subcommands shortcuts r=Emilgardis a=sigmaSd

Hi, this pr adds sub-commands shortcuts `['b','c','r', 't']` to the cli.
The main reason is currently the error when using them is misleading.
Example:
this command:
`cross b --target arm-linux-androideabi`
outputs this error: 
`error: linking with `cc` failed: exit code: 1` 
which took me a while to figure out that cross is not recognizing the sub-command and is falling-back to cargo.
Also they are useful to have.


Co-authored-by: Nbiba Bedis <[email protected]>
  • Loading branch information
bors[bot] and sigmaSd authored Sep 18, 2020
2 parents e88c7b2 + 2ca35f7 commit 91dee08
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/cargo.rs
Original file line number Diff line number Diff line change
Expand Up @@ -38,12 +38,12 @@ impl Subcommand {
impl<'a> From<&'a str> for Subcommand {
fn from(s: &str) -> Subcommand {
match s {
"build" => Subcommand::Build,
"check" => Subcommand::Check,
"b" | "build" => Subcommand::Build,
"c" | "check" => Subcommand::Check,
"doc" => Subcommand::Doc,
"run" => Subcommand::Run,
"r" | "run" => Subcommand::Run,
"rustc" => Subcommand::Rustc,
"test" => Subcommand::Test,
"t" | "test" => Subcommand::Test,
"bench" => Subcommand::Bench,
"deb" => Subcommand::Deb,
"clippy" => Subcommand::Clippy,
Expand Down

0 comments on commit 91dee08

Please sign in to comment.