* Fix #633 - pass CLI to tasks * Add test case
This commit is contained in:
parent
2243e3fbc2
commit
e39c57482a
3 changed files with 30 additions and 1 deletions
|
|
@ -40,10 +40,18 @@ proc execNimscript(nimsFile, projectDir, actionName: string, options: Options):
|
|||
if not isScriptResultCopied:
|
||||
nimsFileCopied.removeFile()
|
||||
|
||||
let
|
||||
var
|
||||
cmd = ("nim e --hints:off --verbosity:0 -p:" & (getTempDir() / "nimblecache").quoteShell &
|
||||
" " & nimsFileCopied.quoteShell & " " & outFile.quoteShell & " " & actionName).strip()
|
||||
|
||||
if options.action.typ == actionCustom and actionName != "printPkgInfo":
|
||||
for i in options.action.arguments:
|
||||
cmd &= " " & i.quoteShell()
|
||||
for key, val in options.action.flags.pairs():
|
||||
cmd &= " $#$#" % [if key.len == 1: "-" else: "--", key]
|
||||
if val.len != 0:
|
||||
cmd &= ":" & val.quoteShell()
|
||||
|
||||
displayDebug("Executing " & cmd)
|
||||
|
||||
result.exitCode = execCmd(cmd)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue