From 511d70299e4836187076bb8f69f955c9701280cd Mon Sep 17 00:00:00 2001 From: jan Michal Date: Sat, 5 Feb 2022 14:50:33 +0000 Subject: [PATCH] fixed issue when a package with the same name was in both repos and aur --- Cargo.toml | 4 ++-- PKGBUILD | 2 +- src/internal/sort.rs | 12 ++++++------ 3 files changed, 9 insertions(+), 9 deletions(-) diff --git a/Cargo.toml b/Cargo.toml index f68234a..20d3588 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "Amethyst" -version = "3.0.0" +version = "3.0.1" authors = ["michal ", "axtlos "] edition = "2021" description = "A fast and efficient AUR helper." @@ -57,4 +57,4 @@ runas = "0.2.1" rusqlite = { version = "0.26.3", default-features = false } ureq = { version = "2.4.0", default-features = false, features = ["native-tls", "json"] } serde = { version = "1.0.90", default-features = false, features = ["derive", "serde_derive"] } -native-tls = "0.2.8" \ No newline at end of file +native-tls = "0.2.8" diff --git a/PKGBUILD b/PKGBUILD index 0efa7c9..26cffaf 100644 --- a/PKGBUILD +++ b/PKGBUILD @@ -3,7 +3,7 @@ # Developer: jnats pkgname=amethyst -pkgver=3.0.0 +pkgver=3.0.1 pkgrel=1 pkgdesc="Fast, efficient and lightweight AUR helper/pacman wrapper" arch=('any') diff --git a/src/internal/sort.rs b/src/internal/sort.rs index 64d6430..93b6896 100644 --- a/src/internal/sort.rs +++ b/src/internal/sort.rs @@ -24,16 +24,16 @@ pub fn sort(input: &[String], options: Options) -> structs::Sorted { .status() .expect("Something has gone wrong"); - if rpc::rpcinfo(b.to_string()).found { - if verbosity >= 1 { - log(format!("{} found in AUR", b)); - } - aur.push(b.to_string()); - } else if let Some(0) = rs.code() { + if let Some(0) = rs.code() { if verbosity >= 1 { log(format!("{} found in repos", b)); } repo.push(b.to_string()); + } else if rpc::rpcinfo(b.to_string()).found { + if verbosity >= 1 { + log(format!("{} found in AUR", b)); + } + aur.push(b.to_string()); } else { if verbosity >= 1 { log(format!("{} not found", b));