From 09bdd844b44b0fcb40d8eff9fe05ecc53cc85121 Mon Sep 17 00:00:00 2001 From: Itamar Date: Wed, 16 Mar 2022 22:03:23 +0200 Subject: [PATCH] Utilities: Remove redundant program name element in Core::command() call This removes a redundant program name element from the arguments Vector in calls to Core::command(). The Shell's argument parsing logic tolerated the extra argument, until 83609ad. --- Userland/Utilities/update-cpp-test-results.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Userland/Utilities/update-cpp-test-results.cpp b/Userland/Utilities/update-cpp-test-results.cpp index 51f9aa1e5a..ac2959c975 100644 --- a/Userland/Utilities/update-cpp-test-results.cpp +++ b/Userland/Utilities/update-cpp-test-results.cpp @@ -20,7 +20,7 @@ ErrorOr serenity_main(Main::Arguments) continue; auto ast_full_path = cpp_full_path.replace(".cpp", ".ast"); outln("{}", cpp_full_path); - auto res = Core::command("/bin/sh", { "sh", "-c", String::formatted("cpp-parser {} > {}", cpp_full_path, ast_full_path) }, {}); + auto res = Core::command("/bin/sh", { "-c", String::formatted("cpp-parser {} > {}", cpp_full_path, ast_full_path) }, {}); VERIFY(!res.is_error()); } @@ -31,7 +31,7 @@ ErrorOr serenity_main(Main::Arguments) continue; auto ast_full_path = cpp_full_path.replace(".cpp", ".txt"); outln("{}", cpp_full_path); - auto res = Core::command("/bin/sh", { "sh", "-c", String::formatted("cpp-preprocessor {} > {}", cpp_full_path, ast_full_path) }, {}); + auto res = Core::command("/bin/sh", { "-c", String::formatted("cpp-preprocessor {} > {}", cpp_full_path, ast_full_path) }, {}); VERIFY(!res.is_error()); }