make tests green again
This commit is contained in:
parent
9b31f67859
commit
0926754e68
31 changed files with 61 additions and 55 deletions
|
|
@ -22,10 +22,10 @@ proc runTask*(name: string) {.inline.}
|
|||
proc shell*(cmd: varargs[string, `$`]): int {.discardable.}
|
||||
proc cd*(dir: string) {.inline.}
|
||||
|
||||
template nakeImports*(): stmt {.immediate.} =
|
||||
template nakeImports*() =
|
||||
import tables, parseopt, strutils, os
|
||||
|
||||
template task*(name: string; description: string; body: stmt): stmt {.dirty, immediate.} =
|
||||
template task*(name: string; description: string; body: untyped) {.dirty.} =
|
||||
block:
|
||||
var t = newTask(description, proc() {.closure.} =
|
||||
body)
|
||||
|
|
@ -40,7 +40,7 @@ proc runTask*(name: string) = tasks[name].action()
|
|||
proc shell*(cmd: varargs[string, `$`]): int =
|
||||
result = execShellCmd(cmd.join(" "))
|
||||
proc cd*(dir: string) = setCurrentDir(dir)
|
||||
template withDir*(dir: string; body: stmt): stmt =
|
||||
template withDir*(dir: string; body: untyped) =
|
||||
## temporary cd
|
||||
## withDir "foo":
|
||||
## # inside foo
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue