From 5149e3714d47b57b80156c450c9b483217c45471 Mon Sep 17 00:00:00 2001 From: Jo Date: Fri, 21 Jun 2024 10:06:02 +0200 Subject: [PATCH] fix(query): match empty pacman -Si with AUR info (#2459) --- query.go | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/query.go b/query.go index ece55a5b..c9dfa068 100644 --- a/query.go +++ b/query.go @@ -45,6 +45,10 @@ func syncInfo(ctx context.Context, run *runtime.Runtime, pkgS = query.RemoveInvalidTargets(run.Logger, pkgS, run.Cfg.Mode) aurS, repoS := packageSlices(pkgS, run.Cfg, dbExecutor) + if len(repoS) == 0 && len(aurS) == 0 { + aurS = dbExecutor.InstalledRemotePackageNames() + } + if len(aurS) != 0 { noDB := make([]string, 0, len(aurS)) @@ -64,7 +68,7 @@ func syncInfo(ctx context.Context, run *runtime.Runtime, } } - if len(repoS) != 0 { + if len(repoS) != 0 || (len(aurS) == 0 && len(repoS) == 0) { arguments := cmdArgs.Copy() arguments.ClearTargets() arguments.AddTarget(repoS...)