From 39a3775f4870fb16b49fec24aa5fd506b17a0ea9 Mon Sep 17 00:00:00 2001 From: Tim Schumacher Date: Sat, 20 Aug 2022 17:01:53 +0200 Subject: Userland: Rely on a single authoritative source for the default `PATH` --- Userland/Applications/Terminal/main.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'Userland/Applications') diff --git a/Userland/Applications/Terminal/main.cpp b/Userland/Applications/Terminal/main.cpp index 7e15a469fd..1866973673 100644 --- a/Userland/Applications/Terminal/main.cpp +++ b/Userland/Applications/Terminal/main.cpp @@ -11,6 +11,7 @@ #include #include #include +#include #include #include #include @@ -162,7 +163,7 @@ static ErrorOr run_command(String command, bool keep_open) arguments.append("-c"sv); arguments.append(command); } - auto env = TRY(FixedArray::try_create({ "TERM=xterm"sv, "PAGER=more"sv, "PATH=/usr/local/sbin:/usr/local/bin:/usr/bin:/bin"sv })); + auto env = TRY(FixedArray::try_create({ "TERM=xterm"sv, "PAGER=more"sv, "PATH="sv DEFAULT_PATH_SV })); TRY(Core::System::exec(shell, arguments, Core::System::SearchInPath::No, env.span())); VERIFY_NOT_REACHED(); } -- cgit v1.2.3