Make OSDK errors clear if commands don't exist

This commit is contained in:
Zhang Junyang
2025-06-13 11:19:00 +08:00
committed by Tate, Hongliang Tian
parent 4a9977d9a7
commit f3f0e9a244
13 changed files with 97 additions and 25 deletions

View File

@ -2,7 +2,7 @@
use std::process::Command;
use crate::util::get_kernel_crate;
use crate::util::{get_kernel_crate, new_command_checked_exists};
pub const COMMON_CARGO_ARGS: &[&str] = &[
"-Zbuild-std=core,alloc,compiler_builtins",
@ -12,7 +12,7 @@ pub const COMMON_CARGO_ARGS: &[&str] = &[
pub const DEFAULT_TARGET_RELPATH: &str = "osdk";
pub fn cargo() -> Command {
Command::new("cargo")
new_command_checked_exists("cargo")
}
pub fn profile_name_adapter(profile: &str) -> &str {