From 98ee2fcd1beddbfd58fd1f17b3595a8e4d0ae414 Mon Sep 17 00:00:00 2001 From: Mathis Wiehl Date: Mon, 6 Mar 2023 19:46:51 +0100 Subject: man: Skip shellrc when invoking pager using sh man invokes the pager command via `sh` which, since beaae6b420cbe85a2d382f8f75447fb49514c20f launches `Shell` in posix mode. As the referenced commits message indicates, launching `Shell` in posix mode while interactive, makes it choke on the default `.shellrc`. This made `man` spew out some shell syntax errors to stderr every time it invoked the pager. To fix that, invoke `sh` with `--skip-shellrc` for now as suggested by the aforementioned commit. --- Userland/Utilities/man.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Userland/Utilities/man.cpp b/Userland/Utilities/man.cpp index 27ff9284a4..cc026c21b6 100644 --- a/Userland/Utilities/man.cpp +++ b/Userland/Utilities/man.cpp @@ -23,7 +23,7 @@ static ErrorOr pipe_to_pager(DeprecatedString const& command) { - char const* argv[] = { "sh", "-c", command.characters(), nullptr }; + char const* argv[] = { "sh", "--skip-shellrc", "-c", command.characters(), nullptr }; auto stdout_pipe = TRY(Core::System::pipe2(O_CLOEXEC)); -- cgit v1.2.3