-
Notifications
You must be signed in to change notification settings - Fork 145
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Precendence order #211
Comments
I have same issue as you, but i'm using mac. |
The /**
* Loads and merges a JavaScript object into config
*/
load: function(conf) {
overlay(conf, this._instance, this._schema);
// environment and arguments always overrides config files
importEnvironment(rv);
importArguments(rv);
return this;
} |
I prefer load has same precedence with loadFile. A use case is an encrypted conf file which is decrypted and consumed by convict. It's also ok that loadFile accepts object not only file path. |
@madarche this issue should be closed This issue/problem is not reproductible on Windows, I tried :
I got :
|
@A-312 your example confirms this issue. According documentation I believe that it is documentation issue, because this comment shows intention to process arguments and environment with higher priority. |
I read a new time, you have right 😕 But, in some cases we want Or allow
Like that:
|
@A-312 this logic lives for 8 years already. As I see the only problem here is wrong documentation. In addition I want to say that |
Precendence order
I try to test Windows, but do not work following.
**When merging configuration values from different sources, Convict follows precedence rules. The order, from lowest to highest, is:
1.Default value
2.File (config.loadFile())
3.Environment variables
4.Command line arguments
5.Set and load calls (config.set() and config.load())**
In Mac computer Precendence order is work well, But In Windows computer belows order
1.Default value
2.File (config.loadFile())
3.Set and load calls (config.set() and config.load())
4.Environment variables
5.Command line arguments
Set and load calls < Environment variables
In Windows, Set and load calls is not highes order.
The text was updated successfully, but these errors were encountered: