diff --git a/src/utils/process.cpp b/src/utils/process.cpp index 56db644f..1f7ffce6 100644 --- a/src/utils/process.cpp +++ b/src/utils/process.cpp @@ -37,11 +37,10 @@ namespace process_util { * Execute command using shell */ void exec_sh(const char* cmd) { - static const string shell{env_util::get("SHELL", "/bin/sh")}; - if (cmd != nullptr) { + static const string shell{env_util::get("POLYBAR_SHELL", "/bin/sh")}; execlp(shell.c_str(), shell.c_str(), "-c", cmd, nullptr); - throw system_error("execvp() failed"); + throw system_error("execlp() failed"); } }