diff options
author | Mathis Wiehl <mail@mathiswiehl.de> | 2023-03-06 19:46:51 +0100 |
---|---|---|
committer | Andreas Kling <kling@serenityos.org> | 2023-03-07 00:42:32 +0100 |
commit | 98ee2fcd1beddbfd58fd1f17b3595a8e4d0ae414 (patch) | |
tree | afd498fd361e51c7de2b810c59e7c502dc687cf6 | |
parent | d1371d66f79d7482b4fe1acd58803c0a5db734f4 (diff) | |
download | serenity-98ee2fcd1beddbfd58fd1f17b3595a8e4d0ae414.zip |
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.
-rw-r--r-- | Userland/Utilities/man.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
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<pid_t> 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)); |