Skip to content

Commit

Permalink
core: fixup execAndGet
Browse files Browse the repository at this point in the history
fixes #8410
  • Loading branch information
vaxerski committed Nov 10, 2024
1 parent 9e62806 commit c10739e
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion hyprpm/src/core/PluginManager.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ using namespace Hyprutils::OS;
static std::string execAndGet(std::string cmd) {
cmd += " 2>&1";

CProcess proc("/bin/sh", {cmd});
CProcess proc("/bin/sh", {"-c", cmd});

if (!proc.runSync())
return "error";
Expand Down
2 changes: 1 addition & 1 deletion src/helpers/MiscFunctions.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -585,7 +585,7 @@ float vecToRectDistanceSquared(const Vector2D& vec, const Vector2D& p1, const Ve

// Execute a shell command and get the output
std::string execAndGet(const char* cmd) {
CProcess proc("/bin/sh", {cmd});
CProcess proc("/bin/sh", {"-c", cmd});

if (!proc.runSync())
return "error";
Expand Down

0 comments on commit c10739e

Please sign in to comment.