diff --git a/src/install.rs b/src/install.rs index 4e7bbed1..807a9840 100644 --- a/src/install.rs +++ b/src/install.rs @@ -882,9 +882,11 @@ impl Installer { Err(e) => { if config.fail_fast { self.failed.pop().unwrap(); + print_aur_link(config, &base); return Err(e); } print_error(config.color.error, e); + print_aur_link(config, &base); } } } @@ -1253,6 +1255,17 @@ impl Installer { } } +fn print_aur_link(config: &Config, base: &Base) { + if let Base::Aur(aur_base) = base { + eprintln!( + "{} {}/packages/{}", + tr!("view on AUR:"), + config.aur_url.as_str().trim_end_matches('/'), + aur_base.package_base() + ); + } +} + fn is_debug(pkg: &alpm::Package) -> bool { if let Some(base) = pkg.base() { if pkg.name().ends_with("-debug") && pkg.name().trim_end_matches("-debug") == base {