diff options
author | kitsunyan | 2018-05-19 03:07:08 +0000 |
---|---|---|
committer | kitsunyan | 2018-05-19 03:07:08 +0000 |
commit | 921c83730f425dfb6b7db459044db839124dcff4 (patch) | |
tree | b8d9a975b3792244e45c3c34bfd7e49ff0098329 /src | |
parent | bfabe37c987c2ff1718ea06bffce04dde9316efc (diff) |
Add support for "--ask" flag
Diffstat (limited to 'src')
-rw-r--r-- | src/feature/syncinstall.nim | 3 | ||||
-rw-r--r-- | src/pacman.nim | 3 |
2 files changed, 4 insertions, 2 deletions
diff --git a/src/feature/syncinstall.nim b/src/feature/syncinstall.nim index a686be4..ecab3f5 100644 --- a/src/feature/syncinstall.nim +++ b/src/feature/syncinstall.nim @@ -1259,7 +1259,8 @@ proc handleSyncInstall*(args: seq[Argument], config: Config): int = let noconfirm = args .filter(arg => arg.matchOption(%%%"confirm") or arg.matchOption(%%%"noconfirm")).optLast - .map(arg => arg.key == "noconfirm").get(false) + .map(arg => arg.key == "noconfirm").get(false) or + args.check(%%%"ask") let targets = args.packageTargets(false) diff --git a/src/pacman.nim b/src/pacman.nim index 25833ee..af8902b 100644 --- a/src/pacman.nim +++ b/src/pacman.nim @@ -83,7 +83,8 @@ const ^o("hookdir"), ^o("logfile"), o("noconfirm"), - o("confirm") + o("confirm"), + ^o("ask") ] transactionOptions*: seq[CommandOption] = @[ |