mirror of
https://github.com/RGBCube/serenity
synced 2025-07-25 18:07:34 +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
|
@ -10,6 +10,7 @@
|
|||
#include <AK/Types.h>
|
||||
#include <LibCore/ArgsParser.h>
|
||||
#include <LibCore/EventLoop.h>
|
||||
#include <LibCore/File.h>
|
||||
#include <LibCore/TCPServer.h>
|
||||
#include <LibMain/Main.h>
|
||||
#include <fcntl.h>
|
||||
|
@ -71,7 +72,7 @@ static void run_command(int ptm_fd, String command)
|
|||
args[1] = "-c";
|
||||
args[2] = command.characters();
|
||||
}
|
||||
char const* envs[] = { "TERM=xterm", "PATH=/usr/local/sbin:/usr/local/bin:/usr/bin:/bin", nullptr };
|
||||
char const* envs[] = { "TERM=xterm", "PATH=" DEFAULT_PATH, nullptr };
|
||||
rc = execve("/bin/Shell", const_cast<char**>(args), const_cast<char**>(envs));
|
||||
if (rc < 0) {
|
||||
perror("execve");
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue