diff options
Diffstat (limited to 'src/config.nim')
-rw-r--r-- | src/config.nim | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/src/config.nim b/src/config.nim index f0c8710..2aa9974 100644 --- a/src/config.nim +++ b/src/config.nim @@ -164,3 +164,8 @@ proc obtainConfig*(config: PacmanConfig): Config = aurComments: aurComments, checkIgnored: checkIgnored, printAurNotFound: printAurNotFound, sudoExec: sudoExec, viewNoDefault: viewNoDefault, preserveBuilt: preserveBuilt, preBuildCommand: preBuildCommand) + +template withAlpmConfig*(config: Config, passDbs: bool, + handle: untyped, alpmDbs: untyped, errors: untyped, body: untyped): untyped = + withAlpm(config.root, config.db, if passDbs: config.dbs else: @[], config.arch, + handle, alpmDbs, errors, body) |