From 8e126912135cb8964b4e22d1109867aa03a13319 Mon Sep 17 00:00:00 2001 From: alaviss Date: Mon, 4 Mar 2019 15:09:14 +0700 Subject: 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 --- compiler/extccomp.nim | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'compiler/extccomp.nim') 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): -- cgit 1.4.1-2-gfad0