Browse Source

Merge pull request #20 from mateocabanal/add-verbose-error-mesg

More verbose error responses
pull/23/head
Meziu 3 years ago committed by GitHub
parent
commit
7c8d450a4a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 6
      src/main.rs

6
src/main.rs

@ -199,7 +199,7 @@ impl CargoCommand {
/// If there is no pre-built std detected in the sysroot, `build-std` is used. /// If there is no pre-built std detected in the sysroot, `build-std` is used.
fn make_cargo_build_command(&self) -> Command { fn make_cargo_build_command(&self) -> Command {
let rustflags = env::var("RUSTFLAGS").unwrap_or_default() let rustflags = env::var("RUSTFLAGS").unwrap_or_default()
+ &format!(" -L{}/libctru/lib -lctru", env::var("DEVKITPRO").unwrap()); + &format!(" -L{}/libctru/lib -lctru", env::var("DEVKITPRO").expect("DEVKITPRO is not defined as an environment variable"));
let cargo = env::var("CARGO").unwrap_or_else(|_| "cargo".to_string()); let cargo = env::var("CARGO").unwrap_or_else(|_| "cargo".to_string());
let sysroot = Self::find_sysroot(); let sysroot = Self::find_sysroot();
let mut command = Command::new(cargo); let mut command = Command::new(cargo);
@ -409,7 +409,7 @@ fn build_smdh(config: &CTRConfig) {
.stdout(Stdio::inherit()) .stdout(Stdio::inherit())
.stderr(Stdio::inherit()) .stderr(Stdio::inherit())
.spawn() .spawn()
.unwrap(); .expect("smdhtool command failed, most likely due to 'smdhtool' not being in $PATH");
let status = process.wait().unwrap(); let status = process.wait().unwrap();
@ -443,7 +443,7 @@ fn build_3dsx(config: &CTRConfig) {
.stdout(Stdio::inherit()) .stdout(Stdio::inherit())
.stderr(Stdio::inherit()) .stderr(Stdio::inherit())
.spawn() .spawn()
.unwrap(); .expect("3dsxtool command failed, most likely due to '3dsxtool' not being in $PATH");
let status = process.wait().unwrap(); let status = process.wait().unwrap();

Loading…
Cancel
Save