From 855ba8396725812bee2bf975423700280d3044b1 Mon Sep 17 00:00:00 2001 From: j-james Date: Wed, 23 Dec 2020 12:52:52 -0800 Subject: Add support for pacman's progress bar Easter egg --- src/feature/syncinstall.nim | 6 +++--- src/feature/syncsource.nim | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) (limited to 'src/feature') diff --git a/src/feature/syncinstall.nim b/src/feature/syncinstall.nim index 8f26d0d..53b6585 100644 --- a/src/feature/syncinstall.nim +++ b/src/feature/syncinstall.nim @@ -42,7 +42,7 @@ proc createCloneProgress(config: Config, count: int, flexible: bool, printMode: (proc (update: int, terminate: int) {.closure.}, proc {.closure.}) = if count >= 1 and not printMode: let (update, terminate) = printProgressShare(config.common.progressBar, - tr"cloning repositories") + config.common.chomp, tr"cloning repositories") update(0, count) if flexible: @@ -963,12 +963,12 @@ proc filterIgnoresAndConflicts(config: Config, pkgInfos: seq[PackageInfo], let nonConflicingPkgInfos = acceptedPkgInfos.foldl(block: let conflictsWith = collect(newSeq): for p in a: - if p.rpc.name != b.rpc.name and + if p.rpc.name != b.rpc.name and (block:collect(newSeq): for c in b.conflicts: if c.isProvidedBy(p.rpc.toPackageReference, true): 0 - ).len>0 or + ).len>0 or (block:collect(newSeq): for c in p.conflicts: if c.isProvidedBy(p.rpc.toPackageReference, true): diff --git a/src/feature/syncsource.nim b/src/feature/syncsource.nim index f966085..f16f7c6 100644 --- a/src/feature/syncsource.nim +++ b/src/feature/syncsource.nim @@ -130,7 +130,7 @@ proc cloneAndCopy(config: Config, quiet: bool, fullTargets: seq[FullPackageTarge newSeq[BaseTarget]()) let (update, terminate) = if not quiet: - printProgressShare(config.common.progressBar, tr"cloning repositories") + printProgressShare(config.common.progressBar, config.common.chomp, tr"cloning repositories") else: (proc (i0: int, i1: int) {.sideEffect,closure.} = discard, proc () {.sideEffect,closure.} = discard) -- cgit v1.2.3-70-g09d2