cmdline/env: don't set empty envvars

This commit is contained in:
Robert Swiecki 2018-10-28 21:03:10 +01:00
parent c7dd18c612
commit c05b47b3b6

View File

@ -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));