mirror of
https://github.com/nim-lang/Nim.git
synced 2026-07-19 07:21:19 +00:00
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:
@@ -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):
|
||||
|
||||
Reference in New Issue
Block a user