diff options
author | bptato <nincsnevem662@gmail.com> | 2024-12-27 19:10:26 +0100 |
---|---|---|
committer | bptato <nincsnevem662@gmail.com> | 2024-12-27 19:10:26 +0100 |
commit | dff94db8a286d6b863305f84ace65e9806313331 (patch) | |
tree | fcd187af4693088a9d6fd692da50467adcab984f /src/main.nim | |
parent | abd58fa6ea7271021acb620056516e9129c5ee97 (diff) | |
download | chawan-dff94db8a286d6b863305f84ace65e9806313331.tar.gz |
CHA_CONFIG_DIR -> CHA_DIR
It isn't really limited to config. It just happens to be in XDG_CONFIG_HOME because XDG basedirs suck. (W3M_DIR works similarly.)
Diffstat (limited to 'src/main.nim')
-rw-r--r-- | src/main.nim | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/main.nim b/src/main.nim index 22455239..5ef498a1 100644 --- a/src/main.nim +++ b/src/main.nim @@ -211,11 +211,11 @@ const defaultConfig = staticRead"res/config.toml" proc initConfig(ctx: ParamParseContext; config: Config; warnings: var seq[string]): Err[string] = - let ps = openConfig(config.dir, ctx.configPath) + let ps = openConfig(config.dir, ctx.configPath, warnings) if ps == nil and ctx.configPath.isSome: # The user specified a non-existent config file. return err("Failed to open config file " & ctx.configPath.get) - putEnv("CHA_CONFIG_DIR", config.dir) + putEnv("CHA_DIR", config.dir) ?config.parseConfig("res", defaultConfig, warnings) when defined(debug): if (let ps = newPosixStream(getCurrentDir() / "res/config.toml"); |