From 97630bcd819e016fb13b10a25f784c6973ac1432 Mon Sep 17 00:00:00 2001 From: jdholtz Date: Fri, 21 Jun 2024 17:18:17 -0700 Subject: [PATCH] Respect provided targets when using -Si flag --- query.go | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/query.go b/query.go index c9dfa068..747e1f9d 100644 --- a/query.go +++ b/query.go @@ -46,7 +46,13 @@ func syncInfo(ctx context.Context, run *runtime.Runtime, aurS, repoS := packageSlices(pkgS, run.Cfg, dbExecutor) if len(repoS) == 0 && len(aurS) == 0 { - aurS = dbExecutor.InstalledRemotePackageNames() + if run.Cfg.Mode != parser.ModeRepo { + aurS = dbExecutor.InstalledRemotePackageNames() + } + + if run.Cfg.Mode != parser.ModeAUR { + repoS = dbExecutor.InstalledSyncPackageNames() + } } if len(aurS) != 0 {