Fix: cmd line options overwrite env variable config options
[lttng-tools.git] / src / bin / lttng-sessiond / main.c
index 3d2cad9361464534128a44f5917d01f1e58899fe..e032e037c3ebf933f0caa216cd292578fbb7e9ae 100644 (file)
@@ -5830,6 +5830,12 @@ int main(int argc, char **argv)
                goto exit_set_signal_handler;
        }
 
+       /*
+        * Init config from environment variables.
+        * Command line option override env configuration per-doc. Do env first.
+        */
+       sessiond_config_apply_env_config(&config);
+
        /*
         * Parse arguments and load the daemon configuration file.
         *
@@ -5844,9 +5850,6 @@ int main(int argc, char **argv)
                goto exit_options;
        }
 
-       /* Init config from environment variables. */
-       sessiond_config_apply_env_config(&config);
-
        /*
         * Resolve all paths received as arguments, configuration option, or
         * through environment variable as absolute paths. This is necessary
This page took 0.024108 seconds and 5 git commands to generate.