mirror of
https://github.com/asterinas/asterinas.git
synced 2025-06-26 19:03:27 +00:00
Make OSDK wrapped commands unified and fix make docs
This commit is contained in:
committed by
Tate, Hongliang Tian
parent
132d36bf20
commit
160cb9cdb5
@ -3,14 +3,25 @@
|
||||
//! This module contains subcommands of cargo-osdk.
|
||||
|
||||
mod build;
|
||||
mod check;
|
||||
mod clippy;
|
||||
mod new;
|
||||
mod run;
|
||||
mod test;
|
||||
mod util;
|
||||
|
||||
pub use self::{
|
||||
build::execute_build_command, check::execute_check_command, clippy::execute_clippy_command,
|
||||
new::execute_new_command, run::execute_run_command, test::execute_test_command,
|
||||
build::execute_build_command, new::execute_new_command, run::execute_run_command,
|
||||
test::execute_test_command,
|
||||
};
|
||||
|
||||
/// Execute the forwarded cargo command with args containing the subcommand and its arguments.
|
||||
pub fn execute_forwarded_command(subcommand: &str, args: &Vec<String>) -> ! {
|
||||
let mut cargo = util::cargo();
|
||||
cargo
|
||||
.arg(subcommand)
|
||||
.args(util::COMMON_CARGO_ARGS)
|
||||
.arg("--target")
|
||||
.arg("x86_64-unknown-none")
|
||||
.args(args);
|
||||
let status = cargo.status().expect("Failed to execute cargo");
|
||||
std::process::exit(status.code().unwrap_or(1));
|
||||
}
|
||||
|
Reference in New Issue
Block a user