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
This commit is contained in:
alaviss
2019-03-04 15:09:14 +07:00
committed by Andreas Rumpf
parent 65ad496fed
commit 8e12691213

View File

@@ -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):