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
This commit is contained in:
parent
bb1dd21224
commit
427b412ff9
1 changed files with 4 additions and 1 deletions
|
|
@ -3,7 +3,10 @@
|
||||||
import os, strutils, sets, json
|
import os, strutils, sets, json
|
||||||
|
|
||||||
# Local imports
|
# Local imports
|
||||||
import version, cli, options, tools
|
import cli, options, tools
|
||||||
|
|
||||||
|
when defined(windows):
|
||||||
|
import version
|
||||||
|
|
||||||
when not declared(initHashSet) or not declared(toHashSet):
|
when not declared(initHashSet) or not declared(toHashSet):
|
||||||
import common
|
import common
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue