diff options
| author | Ganesh Viswanathan <dev@genotrance.com> | 2018-07-07 15:03:14 -0500 |
|---|---|---|
| committer | Ganesh Viswanathan <dev@genotrance.com> | 2018-07-07 15:03:14 -0500 |
| commit | bb881a2e653d231ec036db6883ed42d8984eb576 (patch) | |
| tree | f086cdcd20aff38268aa06fc99bc81cdeca1f730 | |
| parent | 1b645dd5b23d9fc435117d5f20f8bb024c0e1f52 (diff) | |
| download | nimgen-bb881a2e653d231ec036db6883ed42d8984eb576.tar.gz nimgen-bb881a2e653d231ec036db6883ed42d8984eb576.zip | |
Fix IOErrors
| -rw-r--r-- | nimgen.nim | 6 | ||||
| -rw-r--r-- | nimgen.nimble | 2 |
2 files changed, 7 insertions, 1 deletions
@@ -476,6 +476,9 @@ proc c2nim(fl, outfile: string, c2nimConfig: c2nimConfigObj) = cfile = "temp-$#.c" % [outfile.extractFilename()] writeFile(cfile, runCtags(file)) + while not fileExists(cfile): + sleep(10) + if c2nimConfig.defines and (c2nimConfig.preprocess or c2nimConfig.ctags): prepend(cfile, getDefines(file, c2nimConfig.inline)) @@ -531,6 +534,9 @@ proc c2nim(fl, outfile: string, c2nimConfig: c2nimConfigObj) = cmd = "cmd /c " & cmd discard execProc(cmd) + while not fileExists(outfile): + sleep(10) + if c2nimConfig.preprocess or c2nimConfig.ctags: try: removeFile(cfile) diff --git a/nimgen.nimble b/nimgen.nimble index 4d7106a..e0833ef 100644 --- a/nimgen.nimble +++ b/nimgen.nimble @@ -9,7 +9,7 @@ skipDirs = @["tests"] # Dependencies -requires "nim >= 0.17.2", "c2nim >= 0.9.13" +requires "nim >= 0.17.0", "c2nim >= 0.9.13" bin = @["nimgen"] |
