fixes #8653
This commit is contained in:
parent
2da0341b4d
commit
3ca8ebe778
3 changed files with 6 additions and 3 deletions
|
|
@ -227,4 +227,7 @@
|
||||||
compile time functions / static blocks. Only in templates / regular code it retains it's old behavior.
|
compile time functions / static blocks. Only in templates / regular code it retains it's old behavior.
|
||||||
This new feature can be accessed via {.experimental: "dynamicBindSym".} pragma/switch.
|
This new feature can be accessed via {.experimental: "dynamicBindSym".} pragma/switch.
|
||||||
|
|
||||||
|
- On Posix systems the global system wide configuration is now put under ``/etc/nim/nim.cfg``,
|
||||||
|
it used to be ``/etc/nim.cfg``. Usually it does not exist, however.
|
||||||
|
|
||||||
### Bugfixes
|
### Bugfixes
|
||||||
|
|
|
||||||
|
|
@ -228,8 +228,8 @@ proc getSystemConfigPath(conf: ConfigRef; filename: string): string =
|
||||||
let p = getPrefixDir(conf)
|
let p = getPrefixDir(conf)
|
||||||
result = joinPath([p, "config", filename])
|
result = joinPath([p, "config", filename])
|
||||||
when defined(unix):
|
when defined(unix):
|
||||||
if not existsFile(result): result = joinPath([p, "etc", filename])
|
if not existsFile(result): result = joinPath([p, "etc/nim", filename])
|
||||||
if not existsFile(result): result = "/etc/" & filename
|
if not existsFile(result): result = "/etc/nim/" & filename
|
||||||
|
|
||||||
proc loadConfigs*(cfg: string; cache: IdentCache; conf: ConfigRef) =
|
proc loadConfigs*(cfg: string; cache: IdentCache; conf: ConfigRef) =
|
||||||
setDefaultLibpath(conf)
|
setDefaultLibpath(conf)
|
||||||
|
|
|
||||||
|
|
@ -154,7 +154,7 @@ passed as a command line argument to the compiler.
|
||||||
The ``nim`` executable processes configuration files in the following
|
The ``nim`` executable processes configuration files in the following
|
||||||
directories (in this order; later files overwrite previous settings):
|
directories (in this order; later files overwrite previous settings):
|
||||||
|
|
||||||
1) ``$nim/config/nim.cfg``, ``/etc/nim.cfg`` (UNIX) or ``%NIMROD%/config/nim.cfg`` (Windows). This file can be skipped with the ``--skipCfg`` command line option.
|
1) ``$nim/config/nim.cfg``, ``/etc/nim/nim.cfg`` (UNIX) or ``%NIM%/config/nim.cfg`` (Windows). This file can be skipped with the ``--skipCfg`` command line option.
|
||||||
2) ``$HOME/.config/nim.cfg`` (POSIX) or ``%APPDATA%/nim.cfg`` (Windows). This file can be skipped with the ``--skipUserCfg`` command line option.
|
2) ``$HOME/.config/nim.cfg`` (POSIX) or ``%APPDATA%/nim.cfg`` (Windows). This file can be skipped with the ``--skipUserCfg`` command line option.
|
||||||
3) ``$parentDir/nim.cfg`` where ``$parentDir`` stands for any parent directory of the project file's path. These files can be skipped with the ``--skipParentCfg`` command line option.
|
3) ``$parentDir/nim.cfg`` where ``$parentDir`` stands for any parent directory of the project file's path. These files can be skipped with the ``--skipParentCfg`` command line option.
|
||||||
4) ``$projectDir/nim.cfg`` where ``$projectDir`` stands for the project file's path. This file can be skipped with the ``--skipProjCfg`` command line option.
|
4) ``$projectDir/nim.cfg`` where ``$projectDir`` stands for the project file's path. This file can be skipped with the ``--skipProjCfg`` command line option.
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue