diff options
author | alaviss <alaviss@users.noreply.github.com> | 2019-03-04 15:09:14 +0700 |
---|---|---|
committer | Andreas Rumpf <rumpf_a@web.de> | 2019-03-04 09:09:14 +0100 |
commit | 8e126912135cb8964b4e22d1109867aa03a13319 (patch) | |
tree | 27e87540d87c377f8b4c5f164f92e288d818422d /compiler/extccomp.nim | |
parent | 65ad496fed0e928594749cb2456513bc47dab89e (diff) | |
download | Nim-8e126912135cb8964b4e22d1109867aa03a13319.tar.gz |
compiler/extccomp: use getNimcacheDir for writing build instruction (#10772)
`conf.nimcacheDir` might be empty during build, which results in the json build instructions being generated in the current directory. This commit fixes the problem by using getNimcacheDir, which generates a valid nimcacheDir should it be empty. Fixes #10768
Diffstat (limited to 'compiler/extccomp.nim')
-rw-r--r-- | compiler/extccomp.nim | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/compiler/extccomp.nim b/compiler/extccomp.nim index 18a81ca96..5a1d33ade 100644 --- a/compiler/extccomp.nim +++ b/compiler/extccomp.nim @@ -969,7 +969,7 @@ proc writeJsonBuildInstructions*(conf: ConfigRef) = var buf = newStringOfCap(50) - let jsonFile = conf.nimcacheDir / RelativeFile(conf.projectName & ".json") + let jsonFile = conf.getNimcacheDir / RelativeFile(conf.projectName & ".json") var f: File if open(f, jsonFile.string, fmWrite): |