From d61c4775083001016c991191ea1f429e563dd978 Mon Sep 17 00:00:00 2001 From: j-james Date: Wed, 11 Nov 2020 23:43:15 -0800 Subject: Add support for pacman's progress bar Easter egg --- src/pacman.nim | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'src/pacman.nim') diff --git a/src/pacman.nim b/src/pacman.nim index 5766ee2..968bbc8 100644 --- a/src/pacman.nim +++ b/src/pacman.nim @@ -299,6 +299,7 @@ proc createConfigFromTable(table: Table[string, string], dbs: seq[string]): Pacm let cacheRel = table.opt("CacheDir") let gpgRel = table.opt("GPGDir") let color = if table.hasKey("Color"): ColorMode.colorAuto else: ColorMode.colorNever + let chomp = table.hasKey("ILoveCandy") let verbosePkgLists = table.hasKey("VerbosePkgLists") let downloadTimeout = not table.hasKey("DisableDownloadTimeout") let arch = table.opt("Architecture").get("auto") @@ -310,7 +311,7 @@ proc createConfigFromTable(table: Table[string, string], dbs: seq[string]): Pacm raise commandError(tr"can not get the architecture", colorNeeded = some(color.get)) - ((dbs, archFinal, false, true, verbosePkgLists, downloadTimeout, none(string), true, + ((dbs, archFinal, false, true, chomp, verbosePkgLists, downloadTimeout, none(string), true, ignorePkgs, ignoreGroups), none(string), rootRel, dbRel, cacheRel, gpgRel, color) proc obtainPacmanConfig*(args: seq[Argument]): PacmanConfig = @@ -385,7 +386,7 @@ proc obtainPacmanConfig*(args: seq[Argument]): PacmanConfig = let argsRootRel = rootRel.get("/") let defaultRoot = defaultRootRel == argsRootRel - let config: PacmanConfig = ((defaultConfig.common.dbs, arch, debug, progressBar, + let config: PacmanConfig = ((defaultConfig.common.dbs, arch, debug, progressBar, defaultConfig.common.chomp, defaultConfig.common.verbosePkgLists, defaultConfig.common.downloadTimeout and downloadTimeout, pgpKeyserver, defaultRoot, ignorePkgs + defaultConfig.common.ignorePkgs, ignoreGroups + defaultConfig.common.ignoreGroups), -- cgit v1.2.3-70-g09d2