From 86ff947e3835822cc448bc0ebbeb0fc6770d7025 Mon Sep 17 00:00:00 2001 From: Michael Carlberg Date: Fri, 12 May 2017 17:40:06 +0200 Subject: [PATCH] fix(process_util): Prefix shell env var Fixes #566 --- src/utils/process.cpp | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) 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"); } }