Join GitHub today
GitHub is home to over 28 million developers working together to host and review code, manage projects, and build software together.Sign up
"%NIM%/config/nim.cfg" is not being read #9244
C:>ver Microsoft Windows [Version 10.0.17134.320] C:>nim --version Nim Compiler Version 0.19.0 [Windows: amd64] Compiled at 2018-09-26 Copyright (c) 2006-2018 by Andreas Rumpf git hash: f6c5c636bb1a1f4e1301ae0ba5a8afecef439132 active boot switches: -d:release
@Araq, thanks for the reply.
When defined as "the
But that's not what "%NIM%/config/nim.cfg" means on windows. By defining it as "%NIM%/config/nim.cfg" (similar to "%APPDATA%/nim/nim.cfg" a bit later), the documentation is saying that the NIM environment variable controls where the nim.cfg files is located. But %NIM% is not used at all.
If you want to leave it as is, the documentation needs to be altered to point out the truth (eg, change it to something like "<NIM_INSTALL_ROOT>/nim/nim.cfg", or, my personal preference, actually implement the use of the NIM environment variable to allow flexibility in placing the system config file within the file system (defaulting to "NIM_INSTALL_ROOT" if NIM is null/missing).
I'm not sure what you mean by that... if you mean that you don't think environment variables are a good way of directing program access, I disagree. The community widely and successfully uses the XDG Base Directory specification and, in fact, you're using it here. In fact, IMO, you're being overly restrictive here by limiting it only to *nix platforms; I think it should be used regardless of platform to allow windows users access to the ability to define where they want their files to be placed and read.
But, in this case, if you don't want to implement the %NIM% indirection, just updating the documentation to say what is really going on would be fine.