mirror of
https://github.com/tsoding/boomer
synced 2024-11-16 12:12:47 +00:00
Add user specific config path.
This commit is contained in:
parent
cad6037c6c
commit
5bdd0c8135
@ -51,10 +51,13 @@ const
|
||||
|
||||
proc main() =
|
||||
var config = defaultConfig
|
||||
var configFile = ""
|
||||
let configFile = block:
|
||||
if paramCount() > 0:
|
||||
paramStr(1)
|
||||
else:
|
||||
getConfigDir() / "boomer" / "config"
|
||||
|
||||
if paramCount() > 0:
|
||||
configFile = paramStr(1)
|
||||
if existsFile configFile:
|
||||
config = loadConfig(configFile)
|
||||
|
||||
echo "Using config: ", config
|
||||
|
Loading…
Reference in New Issue
Block a user