mirror of
https://github.com/cargo-bins/cargo-binstall.git
synced 2025-04-21 21:18:42 +00:00
Add help text for when a crate is not found
This commit is contained in:
parent
84ebc0039e
commit
33f4c76826
1 changed files with 5 additions and 2 deletions
|
@ -1,7 +1,7 @@
|
|||
use std::process::{ExitCode, Termination};
|
||||
|
||||
use log::warn;
|
||||
use miette::{Report, Diagnostic};
|
||||
use miette::{Diagnostic, Report};
|
||||
use thiserror::Error;
|
||||
|
||||
/// Errors emitted by the library portion of cargo-binstall.
|
||||
|
@ -76,7 +76,10 @@ pub enum BinstallError {
|
|||
///
|
||||
/// - Exit code: 76
|
||||
#[error("crates.io api error fetching crate information for '{crate_name}': {err}")]
|
||||
#[diagnostic(code(binstall::crates_io_api))]
|
||||
#[diagnostic(
|
||||
code(binstall::crates_io_api),
|
||||
help("Check that the crate name you provided is correct.\nYou can also search for a matching crate at: https://lib.rs/search?q={crate_name}")
|
||||
)]
|
||||
CratesIoApi {
|
||||
crate_name: String,
|
||||
#[source]
|
||||
|
|
Loading…
Add table
Reference in a new issue