Skip to content

Commit 09f6c46

Browse files
committed
fix: Remove -i flag when querying AUR packages in -Qu operation
Fixes #1340 where `paru -Qui` would crash with a panic. The issue occurred because when the `-i` (info) flag was present, it was passed to `pacman -Q` at line 55. This caused pacman to output full package information instead of just package names. The code then tried to look up these formatted strings as package names with `db.pkg()`, which failed with PkgNotFound and caused the panic. The fix removes the `-i` and `-info` flags before calling pacman to ensure we always get just package names in the output.
1 parent fdbbcdb commit 09f6c46

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

src/query.rs

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,11 @@ pub async fn print_upgrade_list(config: &mut Config) -> Result<i32> {
5252
}
5353

5454
let mut args = config.pacman_args();
55-
args.remove("u").remove("upgrades").arg("q");
55+
args.remove("u")
56+
.remove("upgrades")
57+
.remove("i")
58+
.remove("info")
59+
.arg("q");
5660
args.targets = aur.into_iter().collect();
5761
let output = exec::pacman_output(config, &args)?;
5862
let aur = String::from_utf8(output.stdout)?;

0 commit comments

Comments
 (0)