diff options
Diffstat (limited to 'src/main.nim')
-rw-r--r-- | src/main.nim | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/src/main.nim b/src/main.nim index 3de4a65..87bb8d2 100644 --- a/src/main.nim +++ b/src/main.nim @@ -11,8 +11,15 @@ import "feature/syncsource" proc execSudo*(args: seq[Argument]): int = - execResult(sudoPrefix & getAppFilename() & - lc[x | (y <- args, x <- y.collectArg), string]) + when NimVersion >= "1.2": + execResult(sudoPrefix & getAppFilename() & (block:collect(newSeq): + for y in args: + for x in y.collectArg: + x + )) + else: + execResult(sudoPrefix & getAppFilename() & + lc[x | (y <- args, x <- y.collectArg), string]) proc passValidation(args: seq[Argument], config: Config, nonRootArgs: openArray[OptionPair], rootArgs: openArray[OptionPair], |