From c05b47b3b6f4a32e66a957dcf72bc58365f01931 Mon Sep 17 00:00:00 2001 From: Robert Swiecki Date: Sun, 28 Oct 2018 21:03:10 +0100 Subject: [PATCH] cmdline/env: don't set empty envvars --- cmdline.cc | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/cmdline.cc b/cmdline.cc index 0da4c2e..46bd10d 100644 --- a/cmdline.cc +++ b/cmdline.cc @@ -194,7 +194,8 @@ void addEnv(nsjconf_t* nsjconf, const std::string& env) { } char* e = getenv(env.c_str()); if (!e) { - nsjconf->envs.push_back(env); + LOG_W("Requested to use the '%s' envvar, but it's not set. It'll be ignored", + env.c_str()); return; } nsjconf->envs.push_back(std::string(env).append("=").append(e)); -- 2.7.4