Check Nim version to determine Nimble dir.

This commit is contained in:
Dominik Picheta 2014-10-19 15:21:33 +01:00
commit e3cbc13568
3 changed files with 11 additions and 7 deletions

View file

@ -2,14 +2,17 @@
# BSD License. Look at license.txt for more info.
import parsecfg, streams, strutils, os
import tools
import tools, version
type
TConfig* = object
nimbleDir*: string
proc initConfig(): TConfig =
result.nimbleDir = getHomeDir() / ".nimble"
if getNimrodVersion() > newVersion("0.9.6"):
result.nimbleDir = getHomeDir() / ".nimble"
else:
result.nimbleDir = getHomeDir() / ".babel"
proc parseConfig*(): TConfig =
result = initConfig()