Browse Source

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.
Itamar 3 years ago
parent
commit
09bdd844b4
1 changed files with 2 additions and 2 deletions
  1. 2 2
      Userland/Utilities/update-cpp-test-results.cpp

+ 2 - 2
Userland/Utilities/update-cpp-test-results.cpp

@@ -20,7 +20,7 @@ ErrorOr<int> 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<int> 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());
     }