mirror of https://github.com/polybar/polybar.git
parent
b6c5563b0b
commit
86ff947e38
|
@ -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");
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue