aboutsummaryrefslogtreecommitdiff
path: root/src/main.nim
diff options
context:
space:
mode:
Diffstat (limited to 'src/main.nim')
-rw-r--r--src/main.nim10
1 files changed, 6 insertions, 4 deletions
diff --git a/src/main.nim b/src/main.nim
index 3de4a65..d8ad5a5 100644
--- a/src/main.nim
+++ b/src/main.nim
@@ -1,6 +1,6 @@
import
options, os, posix, re, sequtils, strutils, sugar,
- args, config, format, pacman, utils, "listcomp"
+ args, config, format, pacman, utils
import
"feature/localquery",
@@ -11,9 +11,11 @@ import
"feature/syncsource"
proc execSudo*(args: seq[Argument]): int =
- execResult(sudoPrefix & getAppFilename() &
- lc[x | (y <- args, x <- y.collectArg), string])
-
+ execResult(sudoPrefix & getAppFilename() & (block:collect(newSeq):
+ for y in args:
+ for x in y.collectArg:
+ x
+ ))
proc passValidation(args: seq[Argument], config: Config,
nonRootArgs: openArray[OptionPair], rootArgs: openArray[OptionPair],
opts: varargs[seq[CommandOption]]): int =