mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2024-11-21 23:20:20 +00:00
Userland: Fix PATH environment variable ordering
This commit is contained in:
parent
b1add5860b
commit
2084289162
Notes:
sideshowbarker
2024-07-18 07:05:19 +09:00
Author: https://github.com/boricj Commit: https://github.com/SerenityOS/serenity/commit/20842891622 Pull-request: https://github.com/SerenityOS/serenity/pull/9345
5 changed files with 5 additions and 5 deletions
|
@ -103,7 +103,7 @@ The system server entry looks as below:
|
|||
[TestRunner@ttyS0]
|
||||
Executable=/home/anon/tests/run-tests-and-shutdown.sh
|
||||
StdIO=/dev/ttyS0
|
||||
Environment=DO_SHUTDOWN_AFTER_TESTS=1 TERM=xterm PATH=/bin:/usr/bin:/usr/local/bin
|
||||
Environment=DO_SHUTDOWN_AFTER_TESTS=1 TERM=xterm PATH=/usr/local/bin:/usr/bin:/bin
|
||||
User=anon
|
||||
WorkingDirectory=/home/anon
|
||||
BootModes=self-test
|
||||
|
|
|
@ -96,7 +96,7 @@ static void run_command(String command, bool keep_open)
|
|||
args[arg_index++] = "-c";
|
||||
args[arg_index++] = command.characters();
|
||||
}
|
||||
const char* envs[] = { "TERM=xterm", "PAGER=more", "PATH=/bin:/usr/bin:/usr/local/bin", nullptr };
|
||||
const char* envs[] = { "TERM=xterm", "PAGER=more", "PATH=/usr/local/bin:/usr/bin:/bin", nullptr };
|
||||
int rc = execve(shell.characters(), const_cast<char**>(args), const_cast<char**>(envs));
|
||||
if (rc < 0) {
|
||||
perror("execve");
|
||||
|
|
|
@ -114,7 +114,7 @@ static void update_path_environment_variable()
|
|||
path.append(getenv("PATH"));
|
||||
if (path.length())
|
||||
path.append(":");
|
||||
path.append("/bin:/usr/bin:/usr/local/bin");
|
||||
path.append("/usr/local/bin:/usr/bin:/bin");
|
||||
setenv("PATH", path.to_string().characters(), true);
|
||||
}
|
||||
|
||||
|
|
|
@ -70,7 +70,7 @@ static void run_command(int ptm_fd, String command)
|
|||
args[1] = "-c";
|
||||
args[2] = command.characters();
|
||||
}
|
||||
const char* envs[] = { "TERM=xterm", "PATH=/bin:/usr/bin:/usr/local/bin", nullptr };
|
||||
const char* envs[] = { "TERM=xterm", "PATH=/usr/local/bin:/usr/bin:/bin", nullptr };
|
||||
rc = execve("/bin/Shell", const_cast<char**>(args), const_cast<char**>(envs));
|
||||
if (rc < 0) {
|
||||
perror("execve");
|
||||
|
|
|
@ -1821,7 +1821,7 @@ Shell::Shell()
|
|||
path.append(getenv("PATH"));
|
||||
if (path.length())
|
||||
path.append(":");
|
||||
path.append("/bin:/usr/bin:/usr/local/bin");
|
||||
path.append("/usr/local/bin:/usr/bin:/bin");
|
||||
setenv("PATH", path.to_string().characters(), true);
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue