diff options
author | Benjamin Shirley-Quirk | 2020-08-04 20:36:19 +0000 |
---|---|---|
committer | Benjamin Shirley-Quirk | 2020-08-04 20:36:19 +0000 |
commit | 0afaa2a8cd7e56f4eabcf6b54e83bcab6be39f42 (patch) | |
tree | f474af5f8864f191eb006f3cf69e9c65490fb2cb /src/main.nim | |
parent | 8c75dc9df518579cab48a6ded803bf8d493a3cab (diff) |
compiles now on current devel (1.3.5)
Diffstat (limited to 'src/main.nim')
-rw-r--r-- | src/main.nim | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/src/main.nim b/src/main.nim index 92e8887..af22bc0 100644 --- a/src/main.nim +++ b/src/main.nim @@ -11,8 +11,16 @@ 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], |