mirror of
https://github.com/RGBCube/serenity
synced 2025-07-27 00:27:45 +00:00
Utilities: Use Core::Environment instead of Core::System::*env()
This commit is contained in:
parent
b9dc2d7ebf
commit
7109f3706e
4 changed files with 11 additions and 8 deletions
|
@ -7,6 +7,7 @@
|
|||
|
||||
#include <LibCore/Account.h>
|
||||
#include <LibCore/ArgsParser.h>
|
||||
#include <LibCore/Environment.h>
|
||||
#include <LibCore/GetPassword.h>
|
||||
#include <LibCore/System.h>
|
||||
#include <LibMain/Main.h>
|
||||
|
@ -60,7 +61,7 @@ ErrorOr<int> serenity_main(Main::Arguments arguments)
|
|||
|
||||
TRY(Core::System::pledge("stdio exec"));
|
||||
|
||||
TRY(Core::System::setenv("HOME"sv, account.home_directory(), true));
|
||||
TRY(Core::Environment::set("HOME"sv, account.home_directory(), Core::Environment::Overwrite::Yes));
|
||||
|
||||
if (command.is_null()) {
|
||||
TRY(Core::System::exec(account.shell(), Array<StringView, 1> { account.shell().view() }, Core::System::SearchInPath::No));
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue