mirror of
https://github.com/RGBCube/serenity
synced 2025-07-25 14:17:36 +00:00
Userland: Rely on a single authoritative source for the default PATH
This commit is contained in:
parent
61e18c681b
commit
39a3775f48
7 changed files with 14 additions and 7 deletions
|
@ -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();
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue