From 427b412ff9e6bb72f447b2886b7ff5cfec9393cc Mon Sep 17 00:00:00 2001 From: Ivan Bobev Date: Wed, 7 Aug 2019 23:03:14 +0300 Subject: [PATCH] Fix unused import warning on Unix systems The NimbleError exception from the version module is being used only on Windows platforms in the packageinstaller.nim file. Conditional import of the module is used to fix the warning. Related to #680 --- src/nimblepkg/packageinstaller.nim | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/nimblepkg/packageinstaller.nim b/src/nimblepkg/packageinstaller.nim index 71f305f..4bdc921 100644 --- a/src/nimblepkg/packageinstaller.nim +++ b/src/nimblepkg/packageinstaller.nim @@ -3,7 +3,10 @@ import os, strutils, sets, json # Local imports -import version, cli, options, tools +import cli, options, tools + +when defined(windows): + import version when not declared(initHashSet) or not declared(toHashSet): import common