From c85cdfd8144461757e4d83e0df4a1ae88e16cd12 Mon Sep 17 00:00:00 2001 From: Dominik Picheta Date: Sun, 22 Sep 2019 12:00:15 +0100 Subject: [PATCH] Fixes #706. No more unused import warnings. --- src/nimblepkg/nimscriptwrapper.nim | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/src/nimblepkg/nimscriptwrapper.nim b/src/nimblepkg/nimscriptwrapper.nim index d7b7a3b..23c23c9 100644 --- a/src/nimblepkg/nimscriptwrapper.nim +++ b/src/nimblepkg/nimscriptwrapper.nim @@ -39,9 +39,15 @@ proc execNimscript(nimsFile, projectDir, actionName: string, options: Options): if not isScriptResultCopied and options.shouldRemoveTmp(nimsFileCopied): nimsFileCopied.removeFile() - var - cmd = ("nim e --hints:off --verbosity:0 -p:" & (getTempDir() / "nimblecache").quoteShell & - " " & nimsFileCopied.quoteShell & " " & outFile.quoteShell & " " & actionName).strip() + var cmd = ( + "nim e $# -p:$# $# $# $#" % [ + "--hints:off --warning[UnusedImport]:off --verbosity:0", + (getTempDir() / "nimblecache").quoteShell, + nimsFileCopied.quoteShell, + outFile.quoteShell, + actionName + ] + ).strip() if options.action.typ == actionCustom and actionName != "printPkgInfo": for i in options.action.arguments: