diff options
author | Timothee Cour <timothee.cour2@gmail.com> | 2021-01-02 12:41:44 -0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-01-02 21:41:44 +0100 |
commit | 471aab86a0b793afe34a36b41e4366a686b589b9 (patch) | |
tree | b6645bddaf124f89ddeb5f1d4cce6bb2cc190613 /compiler | |
parent | 2eccef7ad6dd2941bcc78692b499b4cb269e9a2a (diff) | |
download | Nim-471aab86a0b793afe34a36b41e4366a686b589b9.tar.gz |
fix #16526 run config.nims before foo.nim.cfg (#16557)
* fix #16526 run config.nims before foo.nim.cfg * add test
Diffstat (limited to 'compiler')
-rw-r--r-- | compiler/nimconf.nim | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/compiler/nimconf.nim b/compiler/nimconf.nim index 01a79c1e3..1691e7ccf 100644 --- a/compiler/nimconf.nim +++ b/compiler/nimconf.nim @@ -281,6 +281,8 @@ proc loadConfigs*(cfg: RelativeFile; cache: IdentCache; conf: ConfigRef; idgen: if optSkipProjConfigFile notin conf.globalOptions: readConfigFile(pd / cfg) + if cfg == DefaultConfig: + runNimScriptIfExists(pd / DefaultConfigNims) if conf.projectName.len != 0: # new project wide config file: @@ -289,8 +291,6 @@ proc loadConfigs*(cfg: RelativeFile; cache: IdentCache; conf: ConfigRef; idgen: projectConfig = changeFileExt(conf.projectFull, "nim.cfg") readConfigFile(projectConfig) - if cfg == DefaultConfig: - runNimScriptIfExists(pd / DefaultConfigNims) let scriptFile = conf.projectFull.changeFileExt("nims") let scriptIsProj = scriptFile == conf.projectFull |