ensure loaf exists before finding (#256)
This commit is contained in:
parent
0e003b5dba
commit
e987b50610
1 changed files with 7 additions and 1 deletions
|
|
@ -416,8 +416,14 @@ proc findFiles*(file: string, dir: string, recurse = true, regex = false): seq[s
|
||||||
## `file` is a regular expression if `regex` is true
|
## `file` is a regular expression if `regex` is true
|
||||||
##
|
##
|
||||||
## Turn off recursive search with `recurse`
|
## Turn off recursive search with `recurse`
|
||||||
|
let
|
||||||
|
loafExe = loafExePath()
|
||||||
|
|
||||||
|
doAssert fileExists(loafExe), "loaf not compiled: " & loafExe.sanitizePath &
|
||||||
|
" make sure 'nimble build' or 'nimble install' built it"
|
||||||
|
|
||||||
var
|
var
|
||||||
cmd = loafExePath().quoteShell & " find --rexp $1 \"$2\" $3"
|
cmd = loafExe.quoteShell & " find --rexp $1 \"$2\" $3"
|
||||||
recursive = if recurse: "--recurse" else: ""
|
recursive = if recurse: "--recurse" else: ""
|
||||||
|
|
||||||
var
|
var
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue