diff options
author | Tim Schumacher <timschumi@gmx.de> | 2022-08-20 17:01:53 +0200 |
---|---|---|
committer | Linus Groh <mail@linusgroh.de> | 2022-08-23 19:00:04 +0100 |
commit | 39a3775f4870fb16b49fec24aa5fd506b17a0ea9 (patch) | |
tree | 2cd49be1c6563988cf74a67599437d57c7014f67 /Userland/Applications | |
parent | 61e18c681baacca25dffadeab688730402b6c443 (diff) | |
download | serenity-39a3775f4870fb16b49fec24aa5fd506b17a0ea9.zip |
Userland: Rely on a single authoritative source for the default `PATH`
Diffstat (limited to 'Userland/Applications')
-rw-r--r-- | Userland/Applications/Terminal/main.cpp | 3 |
1 files changed, 2 insertions, 1 deletions
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 <LibConfig/Listener.h> #include <LibCore/ArgsParser.h> #include <LibCore/DirIterator.h> +#include <LibCore/File.h> #include <LibCore/System.h> #include <LibDesktop/Launcher.h> #include <LibGUI/Action.h> @@ -162,7 +163,7 @@ static ErrorOr<void> run_command(String command, bool keep_open) arguments.append("-c"sv); arguments.append(command); } - auto env = TRY(FixedArray<StringView>::try_create({ "TERM=xterm"sv, "PAGER=more"sv, "PATH=/usr/local/sbin:/usr/local/bin:/usr/bin:/bin"sv })); + auto env = TRY(FixedArray<StringView>::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(); } |