File tree Expand file tree Collapse file tree 2 files changed +16
-6
lines changed
Expand file tree Collapse file tree 2 files changed +16
-6
lines changed Original file line number Diff line number Diff line change 11use std:: {
22 collections:: HashMap ,
33 env,
4- process:: { self , Command , Stdio } ,
4+ process:: { Command , Stdio } ,
55} ;
66
7- use anyhow:: { anyhow, Context } ;
8- use log:: error;
7+ use anyhow:: { anyhow, bail, Context } ;
98use rustc_version:: Channel ;
109
1110pub fn rust_version ( ) -> anyhow:: Result < ( ) > {
1211 let rust_version = rustc_version:: version_meta ( ) ?;
1312
1413 if rust_version. channel > Channel :: Nightly {
15- error ! (
14+ bail ! (
1615 "cargo-vita requires a nightly rustc version. Do one of the following:\n \
1716 - Run `rustup override set nightly` to use nightly in the current directory\n \
1817 - Run cargo with +nightly flag.\n \
@@ -21,7 +20,6 @@ pub fn rust_version() -> anyhow::Result<()> {
2120 channel = \" nightly\" \n \
2221 components = [ \" rust-src\" ]"
2322 ) ;
24- process:: exit ( 1 ) ;
2523 }
2624
2725 Ok ( ( ) )
Original file line number Diff line number Diff line change @@ -115,7 +115,19 @@ impl Executor for Coredump {
115115
116116 info ! ( "{}: {command:?}" , "Parsing coredump" . blue( ) ) ;
117117
118- if !command. status ( ) ?. success ( ) {
118+ let status = command. status ( ) ;
119+
120+ if let Err ( err) = & status {
121+ if err. kind ( ) == io:: ErrorKind :: NotFound {
122+ bail ! (
123+ "`vita-parse-core` not found. \
124+ Ensure this tool is installed from https://github.com/xyzz/vita-parse-core \
125+ and is available in your PATH."
126+ ) ;
127+ }
128+ }
129+
130+ if !status?. success ( ) {
119131 bail ! ( "vita-parse-core failed" ) ;
120132 }
121133 } else {
You can’t perform that action at this time.
0 commit comments