diff options
author | zqqw | 2020-08-05 13:53:43 +0000 |
---|---|---|
committer | GitHub | 2020-08-05 13:53:43 +0000 |
commit | f2a93bea278e9f43cad98ca8e74f9a423f36e333 (patch) | |
tree | 721da2b78793860b6fb020194efe2eccea88bac9 /src/feature/syncinfo.nim | |
parent | b2321b0ded6f4a9803daf9dbcbd88d56321a9305 (diff) | |
parent | 4bbf3dc2097f1de206fa053fac32f675d4ae2927 (diff) |
Merge pull request #4 from shirleyquirk/lc_useVersion
I mean it this time
Diffstat (limited to 'src/feature/syncinfo.nim')
-rw-r--r-- | src/feature/syncinfo.nim | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/src/feature/syncinfo.nim b/src/feature/syncinfo.nim index a06c88d..6f8dda9 100644 --- a/src/feature/syncinfo.nim +++ b/src/feature/syncinfo.nim @@ -2,7 +2,7 @@ import options, posix, sequtils, strutils, sugar, tables, "../args", "../aur", "../common", "../config", "../format", "../package", "../pacman", "../utils", - "../wrapper/alpm", "../listcomp" + "../wrapper/alpm" const pacmanInfoStrings = [ @@ -131,7 +131,8 @@ proc handleSyncInfo*(args: seq[Argument], config: Config): int = let padding = pacmanInfoStrings.map(s => s.trp).computeMaxLength let pkgInfosTable = pkgInfos.map(i => (i.rpc.toPackageReference, i)).toTable - let codes = code & lc[handleTarget(config, padding, finalArgs, x, - x.rpcInfo.map(i => pkgInfosTable.opt(i.toPackageReference)).flatten) | - (x <- fullTargets), int] + let codes = code & (block:collect(newSeq): + for x in fullTargets: + handleTarget(config, padding, finalArgs, x, x.rpcInfo.map(i => pkgInfosTable.opt(i.toPackageReference)).flatten) + ) codes.filter(c => c != 0).optFirst.get(0) |