This commit is contained in:
andri lim 2019-10-16 21:40:14 +07:00
parent 46bda93863
commit b3a7adcedd
No known key found for this signature in database
GPG Key ID: 31702AE10541E6B9
1 changed files with 3 additions and 3 deletions

View File

@ -7,10 +7,10 @@
import macros, strutils, os, unittest, osproc
proc executeMyself(numModules: int) =
proc executeMyself(numModules: int): int =
let appName = getAppFilename()
for i in 0..<numModules:
discard execCmd appName & " " & $i
result = result or execCmd(appName & " " & $i)
proc getImportStmt(stmtList: NimNode): NimNode =
result = stmtList[0]
@ -52,7 +52,7 @@ macro cliBuilder(stmtList: typed): untyped =
result = quote do:
if paramCount() == 0:
executeMyself `moduleCount`
quit(executeMyself(`moduleCount`))
else:
disableParamFiltering()
`caseStmt`