Fix: cmd line options overwrite env variable config options
[lttng-tools.git] / src / bin / lttng-sessiond / main.c
index cb9e16ec506e8ffbae652ba4dda670af27a0917d..88877c700437d54713020f4dc06c66f543fe4d67 100644 (file)
@@ -5552,6 +5552,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.
         *
@@ -5566,9 +5572,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.02504 seconds and 4 git commands to generate.