From 45788d030a9af75275ac6d6834dbcd55a5ed44dd Mon Sep 17 00:00:00 2001 From: Itamar Date: Wed, 16 Mar 2022 21:56:58 +0200 Subject: [PATCH] HackStudio: Remove program name element in Core::command() calls Core::command() takes care of inserting the program name as the first element in argv, and so we shouldn't include the program name in the argument vector we give it. The Shell's argument parsing logic tolerated the extra argument, until 83609ad. This fixes building serenity components in Hack Studio. --- Userland/DevTools/HackStudio/ProjectBuilder.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Userland/DevTools/HackStudio/ProjectBuilder.cpp b/Userland/DevTools/HackStudio/ProjectBuilder.cpp index 25124923a1..c0683f45b8 100644 --- a/Userland/DevTools/HackStudio/ProjectBuilder.cpp +++ b/Userland/DevTools/HackStudio/ProjectBuilder.cpp @@ -185,7 +185,7 @@ HashMap> ProjectBuilder::get_ void ProjectBuilder::for_each_library_definition(Function func) { - Vector arguments = { "sh", "-c", "find Userland/Libraries -name CMakeLists.txt | xargs grep serenity_lib" }; + Vector arguments = { "-c", "find Userland/Libraries -name CMakeLists.txt | xargs grep serenity_lib" }; auto res = Core::command("/bin/sh", arguments, {}); if (res.is_error()) { warnln("{}", res.error()); @@ -212,7 +212,7 @@ void ProjectBuilder::for_each_library_definition(Function void ProjectBuilder::for_each_library_dependencies(Function)> func) { - Vector arguments = { "sh", "-c", "find Userland/Libraries -name CMakeLists.txt | xargs grep target_link_libraries" }; + Vector arguments = { "-c", "find Userland/Libraries -name CMakeLists.txt | xargs grep target_link_libraries" }; auto res = Core::command("/bin/sh", arguments, {}); if (res.is_error()) { warnln("{}", res.error());