Merge pull request #405 from jangko/fix_404

fixes #404
This commit is contained in:
andri lim 2019-10-17 16:39:53 +07:00 committed by GitHub
commit 57873d747e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
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`