diff --git a/crates/snm_shim/src/lib.rs b/crates/snm_shim/src/lib.rs index 69e6cff3..51d32bd6 100644 --- a/crates/snm_shim/src/lib.rs +++ b/crates/snm_shim/src/lib.rs @@ -43,8 +43,11 @@ pub async fn load_package_manage_shim(prefix: &str, bin_name: &str) -> Result<() ensure_binary_path(&snm_package_manage, &version).await?, ] } else if restricted_list.contains(&command.as_str()) { - return Err(SnmError::CannotFindDefaultCommand { - command: bin_name.to_string(), + return Err(SnmError::NotMatchPackageManagerError { + // command: bin_name.to_string(), + raw_command: args_all.join(" ").to_string(), + expected: package_manager.name, + actual: prefix.to_string(), }); } else { vec![node_dir.clone(), get_default_bin_dir(&node_dir, bin_name)?] diff --git a/crates/snm_utils/src/snm_error.rs b/crates/snm_utils/src/snm_error.rs index 65c846ca..5496714a 100644 --- a/crates/snm_utils/src/snm_error.rs +++ b/crates/snm_utils/src/snm_error.rs @@ -217,11 +217,7 @@ pub fn friendly_error_message(error: SnmError) { actual, } => { eprintln!( - r##" - 👹 You Input: {} , Package Manager not match - - The expected packageManager is {} , but the actual packageManager is {}. - "##, + r##"You input: {} , packageManager not match. The expected packageManager is {} , but the actual packageManager is {}."##, raw_command.bold().red(), expected.green(), actual.red()