mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-04-21 20:15:17 +00:00
Userland: Add /usr/local/sbin
to PATH
by default
`e2fsprogs` adds its tools there.
This commit is contained in:
parent
6256bdb075
commit
84e1017272
Notes:
sideshowbarker
2024-07-17 09:37:04 +09:00
Author: https://github.com/timschumi Commit: https://github.com/SerenityOS/serenity/commit/84e1017272 Pull-request: https://github.com/SerenityOS/serenity/pull/14442 Reviewed-by: https://github.com/FireFox317
4 changed files with 4 additions and 4 deletions
|
@ -161,7 +161,7 @@ static ErrorOr<void> run_command(String command, bool keep_open)
|
|||
arguments.append("-c");
|
||||
arguments.append(command);
|
||||
}
|
||||
auto env = TRY(FixedArray<StringView>::try_create({ "TERM=xterm", "PAGER=more", "PATH=/usr/local/bin:/usr/bin:/bin" }));
|
||||
auto env = TRY(FixedArray<StringView>::try_create({ "TERM=xterm", "PAGER=more", "PATH=/usr/local/sbin:/usr/local/bin:/usr/bin:/bin" }));
|
||||
TRY(Core::System::exec(shell, arguments, Core::System::SearchInPath::No, env.span()));
|
||||
VERIFY_NOT_REACHED();
|
||||
}
|
||||
|
|
|
@ -124,7 +124,7 @@ static void update_path_environment_variable()
|
|||
path.append(getenv("PATH"));
|
||||
if (path.length())
|
||||
path.append(":");
|
||||
path.append("/usr/local/bin:/usr/bin:/bin");
|
||||
path.append("/usr/local/sbin:/usr/local/bin:/usr/bin:/bin");
|
||||
setenv("PATH", path.to_string().characters(), true);
|
||||
}
|
||||
|
||||
|
|
|
@ -71,7 +71,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/bin:/usr/bin:/bin", nullptr };
|
||||
char const* envs[] = { "TERM=xterm", "PATH=/usr/local/sbin:/usr/local/bin:/usr/bin:/bin", nullptr };
|
||||
rc = execve("/bin/Shell", const_cast<char**>(args), const_cast<char**>(envs));
|
||||
if (rc < 0) {
|
||||
perror("execve");
|
||||
|
|
|
@ -2186,7 +2186,7 @@ Shell::Shell()
|
|||
path.append(getenv("PATH"));
|
||||
if (path.length())
|
||||
path.append(":");
|
||||
path.append("/usr/local/bin:/usr/bin:/bin");
|
||||
path.append("/usr/local/sbin:/usr/local/bin:/usr/bin:/bin");
|
||||
setenv("PATH", path.to_string().characters(), true);
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue