diff --git a/Kernel/Syscalls/execve.cpp b/Kernel/Syscalls/execve.cpp index d5714eef1f3..20ae7dcf420 100644 --- a/Kernel/Syscalls/execve.cpp +++ b/Kernel/Syscalls/execve.cpp @@ -849,6 +849,7 @@ KResult Process::exec(String path, Vector arguments, Vector envi if (!shebang_result.is_error()) { auto shebang_words = shebang_result.release_value(); auto shebang_path = shebang_words.first(); + arguments[0] = move(path); if (!arguments.try_prepend(move(shebang_words))) return ENOMEM; return exec(move(shebang_path), move(arguments), move(environment), ++recursion_depth);