From 023edeb786cacde49c1d7adbe0e422a63bbae81c Mon Sep 17 00:00:00 2001 From: Fries Date: Wed, 21 Sep 2022 22:38:28 -0700 Subject: [PATCH] operations/upgrade: stop if repo upgrade failed --- i18n/de/Amethyst.ftl | 2 +- i18n/en/Amethyst.ftl | 2 +- src/operations/upgrade.rs | 10 +++------- 3 files changed, 5 insertions(+), 9 deletions(-) diff --git a/i18n/de/Amethyst.ftl b/i18n/de/Amethyst.ftl index 82e9b1e..6c07468 100644 --- a/i18n/de/Amethyst.ftl +++ b/i18n/de/Amethyst.ftl @@ -47,7 +47,7 @@ installed = installiert # operations::uninstall failed-remove-pkgs = Pakete konnten nicht deinstalliert werden # operations::upgrade -failed-upgrade-repo-pkgs = Pakete von Paketquellen konnten nicht aktualisiert werden, fortfahren AUR Pakete zu aktualisieren? +failed-upgrade-repo-pkgs = Pakete von Paketquellen konnten nicht aktualisiert werden success-upgrade-repo-pkgs = Pakete von Paketquellen wurden erfolgreich aktualisiert couldnt-find-remote-pkg = Remotepaket für {$pkg} konnte nicht gefunden werden no-upgrades-aur-package = Keine Aktualisierungen für AUR Pakete gefunden diff --git a/i18n/en/Amethyst.ftl b/i18n/en/Amethyst.ftl index f590e7e..d7fba9b 100644 --- a/i18n/en/Amethyst.ftl +++ b/i18n/en/Amethyst.ftl @@ -53,7 +53,7 @@ installed = installed failed-remove-pkgs = Failed to remove packages # operations::upgrade -failed-upgrade-repo-pkgs = Failed to upgrade repo packages, continue to upgrading AUR packages? +failed-upgrade-repo-pkgs = Failed to upgrade repo packages success-upgrade-repo-pkgs = Successfully upgraded repo packages couldnt-find-remote-pkg = Could not find the remote package for {$pkg} no-upgrades-aur-package = No upgrades available for installed AUR packages diff --git a/src/operations/upgrade.rs b/src/operations/upgrade.rs index 60256cc..16211c7 100644 --- a/src/operations/upgrade.rs +++ b/src/operations/upgrade.rs @@ -36,13 +36,9 @@ async fn upgrade_repo(options: Options) { .await; if result.is_err() { - let continue_upgrading = prompt!(default no, - "{}", fl!("failed-upgrade-repo-pkgs") - ); - if !continue_upgrading { - tracing::info!("Exiting"); - std::process::exit(AppExitCode::PacmanError as i32); - } + tracing::error!("{}", fl!("failed-upgrade-repo-pkgs")); + tracing::info!("{}", fl!("exiting")); + std::process::exit(AppExitCode::PacmanError as i32); } else { tracing::info!("{}", fl!("success-upgrade-repo-pkgs")); }