diff --git a/src/main.cpp b/src/main.cpp index 0fbb971..96d4d4f 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -371,7 +371,7 @@ bool removePkg(alpm_list_t *pkgNames) { try { auto pkg = std::find(pkgs.begin(), pkgs.end(), includedPkgs[i]); - if (pkgs.begin() >= pkg || pkg >= pkgs.end()) + if (pkg >= pkgs.end()) continue; size_t pkgIndex = std::distance(pkgs.begin(), pkg); diff --git a/src/taur.cpp b/src/taur.cpp index f8a1d6e..e6564dd 100644 --- a/src/taur.cpp +++ b/src/taur.cpp @@ -493,8 +493,6 @@ bool TaurBackend::update_all_aur_pkgs(path cacheDir, bool useGit) { goto text; } - // remove the last ' ' so we can pass it to pacman - pkgs_to_install.erase(pkgs_to_install.end() - 1); if (!pacman_exec("-U", split(pkgs_to_install, ' '), false)) { log_println(ERROR, _("Failed to install/upgrade packages")); return false;