From 83a1cceb4eaa473560a356b911d8ac1866587512 Mon Sep 17 00:00:00 2001 From: Ganesh Viswanathan Date: Thu, 2 May 2019 13:42:59 -0500 Subject: [PATCH] Fix for recursive nimble calls --- src/nimblepkg/nimscriptwrapper.nim | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/nimblepkg/nimscriptwrapper.nim b/src/nimblepkg/nimscriptwrapper.nim index f0b2f86..0956b79 100755 --- a/src/nimblepkg/nimscriptwrapper.nim +++ b/src/nimblepkg/nimscriptwrapper.nim @@ -36,7 +36,9 @@ proc execNimscript(nimsFile, projectDir, actionName: string, options: Options, nimsFile.copyFile(nimsFileCopied) defer: - nimsFileCopied.removeFile() + # Only if copied in this invocation, allows recursive calls of nimble + if not isScriptResultCopied: + nimsFileCopied.removeFile() let cmd = ("nim e --hints:off --verbosity:0 -p:" & (getTempDir() / "nimblecache").quoteShell &