Merge pull request #593 from yglukhov/fix-findExe

Fixed findExe in nimscript
This commit is contained in:
Dominik Picheta 2018-12-14 00:09:44 +00:00 committed by GitHub
commit 9e87cb77a8
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 4 additions and 1 deletions

View file

@ -155,6 +155,8 @@ proc setupVM(graph: ModuleGraph; module: PSym; scriptName: string, flags: Flags)
os.copyFile(getString(a, 0), getString(a, 1))
cbos getLastModificationTime:
setResult(a, toUnix(getLastModificationTime(getString(a, 0))))
cbos findExe:
setResult(a, os.findExe(getString(a, 0)))
cbos rawExec:
setResult(a, osproc.execCmd getString(a, 0))

View file

@ -27,6 +27,7 @@ task repeated, "Testing `nimble c nimscript.nim` with repeated flags":
setCommand "c", "nimscript.nim"
task api, "Testing nimscriptapi module functionality":
doAssert(findExe("nim").len != 0)
echo("PKG_DIR: ", getPkgDir())
before hooks:
@ -48,4 +49,4 @@ before install:
echo("Before PkgDir: ", getPkgDir())
after install:
echo("After PkgDir: ", getPkgDir())
echo("After PkgDir: ", getPkgDir())