Improves pre and post hooks. Fixes #524.

This commit is contained in:
Dominik Picheta 2018-08-23 00:33:06 +01:00
commit db222bbae1
4 changed files with 107 additions and 76 deletions

View file

@ -362,7 +362,7 @@ proc execScript(scriptName: string, flags: Flags, options: Options): PSym =
# Ensure that "nimblepkg/nimscriptapi" is in the PATH.
block:
let t = options.getNimbleDir / "nimblecache"
let t = getTempDir() / "nimblecache"
let tmpNimscriptApiPath = t / "nimblepkg" / "nimscriptapi.nim"
createDir(tmpNimscriptApiPath.splitFile.dir)
writeFile(tmpNimscriptApiPath, nimscriptApi)