File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -201,11 +201,8 @@ impl<'app> CliSession<'app> {
201201 }
202202
203203 let mut configuration = loaded_configuration. configuration ;
204- if let Some ( cli_config) = cli_configuration {
205- configuration. merge_with ( cli_config) ;
206- }
207204
208- // Env vars take highest priority — merge last so they override everything .
205+ // Env vars override config file but are overridden by explicit CLI args .
209206 if let Some ( env_db) = pgls_configuration:: database:: PartialDatabaseConfiguration :: from_env ( )
210207 {
211208 let env_config = PartialConfiguration {
@@ -215,6 +212,10 @@ impl<'app> CliSession<'app> {
215212 configuration. merge_with ( env_config) ;
216213 }
217214
215+ if let Some ( cli_config) = cli_configuration {
216+ configuration. merge_with ( cli_config) ;
217+ }
218+
218219 Ok ( configuration)
219220 }
220221
You can’t perform that action at this time.
0 commit comments