fixes #404
This commit is contained in:
parent
46bda93863
commit
b3a7adcedd
|
@ -7,10 +7,10 @@
|
||||||
|
|
||||||
import macros, strutils, os, unittest, osproc
|
import macros, strutils, os, unittest, osproc
|
||||||
|
|
||||||
proc executeMyself(numModules: int) =
|
proc executeMyself(numModules: int): int =
|
||||||
let appName = getAppFilename()
|
let appName = getAppFilename()
|
||||||
for i in 0..<numModules:
|
for i in 0..<numModules:
|
||||||
discard execCmd appName & " " & $i
|
result = result or execCmd(appName & " " & $i)
|
||||||
|
|
||||||
proc getImportStmt(stmtList: NimNode): NimNode =
|
proc getImportStmt(stmtList: NimNode): NimNode =
|
||||||
result = stmtList[0]
|
result = stmtList[0]
|
||||||
|
@ -52,7 +52,7 @@ macro cliBuilder(stmtList: typed): untyped =
|
||||||
|
|
||||||
result = quote do:
|
result = quote do:
|
||||||
if paramCount() == 0:
|
if paramCount() == 0:
|
||||||
executeMyself `moduleCount`
|
quit(executeMyself(`moduleCount`))
|
||||||
else:
|
else:
|
||||||
disableParamFiltering()
|
disableParamFiltering()
|
||||||
`caseStmt`
|
`caseStmt`
|
||||||
|
|
Loading…
Reference in New Issue