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:
parent
65ad496fed
commit
8e12691213
1 changed files with 1 additions and 1 deletions
|
|
@ -969,7 +969,7 @@ proc writeJsonBuildInstructions*(conf: ConfigRef) =
|
||||||
|
|
||||||
var buf = newStringOfCap(50)
|
var buf = newStringOfCap(50)
|
||||||
|
|
||||||
let jsonFile = conf.nimcacheDir / RelativeFile(conf.projectName & ".json")
|
let jsonFile = conf.getNimcacheDir / RelativeFile(conf.projectName & ".json")
|
||||||
|
|
||||||
var f: File
|
var f: File
|
||||||
if open(f, jsonFile.string, fmWrite):
|
if open(f, jsonFile.string, fmWrite):
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue