runnableExamples: keep (gitignored) generated foo_examples.nim for inspection even on success (#8544)

This commit is contained in:
Timothee Cour 2018-08-07 09:52:55 -07:00 • committed by Andreas Rumpf
commit c352329714
2 changed files with 5 additions and 4 deletions

View file

@ -621,7 +621,8 @@ proc testExamples(c: PContext) =
if os.execShellCmd(os.getAppFilename() & " " & backend & " --nimcache:" & nimcache & " -r " & outp) != 0:
quit "[Examples] failed: see " & outp
else:
removeFile(outp)
# keep generated source file `outp` to allow inspection.
rawMessage(c.config, hintSuccess, ["runnableExamples: " & outp])
removeFile(outp.changeFileExt(ExeExt))
try:
removeDir(nimcache)