mirror of
https://github.com/hyprwm/Hyprland
synced 2024-11-15 07:25:59 +01:00
parent
9e628067fc
commit
c10739e6e3
2 changed files with 2 additions and 2 deletions
|
@ -30,7 +30,7 @@ using namespace Hyprutils::OS;
|
||||||
static std::string execAndGet(std::string cmd) {
|
static std::string execAndGet(std::string cmd) {
|
||||||
cmd += " 2>&1";
|
cmd += " 2>&1";
|
||||||
|
|
||||||
CProcess proc("/bin/sh", {cmd});
|
CProcess proc("/bin/sh", {"-c", cmd});
|
||||||
|
|
||||||
if (!proc.runSync())
|
if (!proc.runSync())
|
||||||
return "error";
|
return "error";
|
||||||
|
|
|
@ -585,7 +585,7 @@ float vecToRectDistanceSquared(const Vector2D& vec, const Vector2D& p1, const Ve
|
||||||
|
|
||||||
// Execute a shell command and get the output
|
// Execute a shell command and get the output
|
||||||
std::string execAndGet(const char* cmd) {
|
std::string execAndGet(const char* cmd) {
|
||||||
CProcess proc("/bin/sh", {cmd});
|
CProcess proc("/bin/sh", {"-c", cmd});
|
||||||
|
|
||||||
if (!proc.runSync())
|
if (!proc.runSync())
|
||||||
return "error";
|
return "error";
|
||||||
|
|
Loading…
Reference in a new issue