diff options
author | kitsunyan | 2018-04-09 17:02:04 +0000 |
---|---|---|
committer | kitsunyan | 2018-04-09 17:02:04 +0000 |
commit | d01a94e1ea2ba514dc02581fd136af44b5ce938e (patch) | |
tree | dab0146f309812863d7db9584102534e4222aba8 /src/main.nim | |
parent | 2be8002d1ee0070f1513ecb42f032901eeeefcb0 (diff) |
Add AUR support for downgrades
Diffstat (limited to 'src/main.nim')
-rw-r--r-- | src/main.nim | 9 |
1 files changed, 1 insertions, 8 deletions
diff --git a/src/main.nim b/src/main.nim index be45329..58cb47e 100644 --- a/src/main.nim +++ b/src/main.nim @@ -90,22 +90,18 @@ proc handleSync(args: seq[Argument], config: Config): int = execResult(collectedArgs) else: let isNonDefaultRoot = not config.isRootDefault - let isDowngrade = args.count((some("u"), "sysupgrade")) >= 2 let isSkipDeps = args.check((some("d"), "nodeps")) let isRootNoDrop = currentUser.uid == 0 and not canDropPrivileges() let build = args.check((none(string), "build")) let noaur = args.check((none(string), "noaur")) - let noBuild = isNonDefaultRoot or isDowngrade or isSkipDeps or isRootNoDrop + let noBuild = isNonDefaultRoot or isSkipDeps or isRootNoDrop if build and noBuild: if isNonDefaultRoot: printError(config.color, tr"non-default root path is specified" & " -- " & tr"building is not allowed") - elif isDowngrade: - printError(config.color, tr"downgrades are enabled" & " -- " & - tr"building is not allowed") elif isSkipDeps: printError(config.color, tr"dependency check is skipped" & " -- " & tr"building is not allowed") @@ -120,9 +116,6 @@ proc handleSync(args: seq[Argument], config: Config): int = if isNonDefaultRoot: printWarning(config.color, tr"non-default root path is specified" & " -- " & tr"'$#' is assumed" % ["--noaur"]) - elif isDowngrade: - printWarning(config.color, tr"downgrades are enabled" & " -- " & - tr"'$#' is assumed" % ["--noaur"]) elif isSkipDeps: printWarning(config.color, tr"dependency check is skipped" & " -- " & tr"'$#' is assumed" % ["--noaur"]) |