kinit: do not insert empty environment variables into the klauncher environment

Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
This commit is contained in:
Ivailo Monev 2022-12-10 01:41:19 +02:00
parent 7cfcbc3775
commit 922b4b44d1

View file

@ -229,6 +229,10 @@ int KLauncherAdaptor::kdeinit_exec_with_workdir(const QString &app, const QStrin
void KLauncherAdaptor::setLaunchEnv(const QString &name, const QString &value)
{
if (name.isEmpty()) {
kWarning() << "attempting to set empty environment variable to" << value;
return;
}
kDebug() << "setting environment variable" << name << "to" << value;
m_environment.insert(name, value);
}