MINOR: config: show HAPROXY_BRANCH in "show env" output
authorValentine Krasnobaeva <vkrasnobaeva@haproxy.com>
Mon, 18 Nov 2024 16:54:25 +0000 (17:54 +0100)
committerWilliam Lallemand <wlallemand@haproxy.com>
Tue, 19 Nov 2024 13:13:50 +0000 (14:13 +0100)
Before this patch HAPROXY_BRANCH was unset just after configuration parsing.
Let's keep it, as it could be used in conditional blocks and some
configuration directives and it's handy to check its runtime value via "show
env".

In master-worker mode, this variable is set to the same value for both
processes.

src/haproxy.c

index 43b282b..f32d488 100644 (file)
@@ -1248,7 +1248,6 @@ static int read_cfg(char *progname)
 
        }
        /* remove temporary environment variables. */
-       unsetenv("HAPROXY_BRANCH");
        unsetenv("HAPROXY_HTTP_LOG_FMT");
        unsetenv("HAPROXY_HTTP_CLF_LOG_FMT");
        unsetenv("HAPROXY_HTTPS_LOG_FMT");