mirror of
https://github.com/vinc/moros.git
synced 2024-06-17 14:37:04 +00:00
e4ce2ab59c
* Use exit code * Add macro_use to sys module * Replace ExitCode with Result<usize, usize> * Add status var * Fix status code * Replace status with ? * Fix regex for var substitution * Remove warnings * Add temporary fix for failing tests * Add q shortcut to calc * Use usize for exit code * Use process exit codes * Reintroduce ExitCode enum * Use ExitCode::UsageError where needed * Display usage error in find command * Add doc
15 lines
345 B
Rust
15 lines
345 B
Rust
use crate::api::process::ExitCode;
|
|
use crate::usr;
|
|
|
|
pub fn main(args: &[&str]) -> Result<(), ExitCode> {
|
|
if args.len() != 3 {
|
|
return Err(ExitCode::UsageError);
|
|
}
|
|
|
|
// TODO: Avoid doing copy+delete
|
|
match usr::copy::main(args) {
|
|
Ok(()) => usr::delete::main(&args[0..2]),
|
|
_ => Err(ExitCode::Failure),
|
|
}
|
|
}
|