oopsie
This commit is contained in:
parent
17e356513f
commit
6ce7ab2b83
1 changed files with 6 additions and 5 deletions
|
@ -4,13 +4,14 @@
|
|||
#include <format> // std::format
|
||||
#include <fstream> // std::ifstream
|
||||
#include <glaze/core/common.hpp> // glz::object
|
||||
#include <glaze/core/context.hpp> // glz::error_ctx, glz::error_code
|
||||
#include <glaze/core/context.hpp> // glz::{error_ctx, error_code}
|
||||
#include <glaze/core/meta.hpp> // glz::detail::Object
|
||||
#include <glaze/core/read.hpp> // glz::read
|
||||
#include <glaze/core/reflect.hpp> // glz::format_error
|
||||
#include <glaze/json/read.hpp> // glz::read<glaze_opts>
|
||||
#include <iterator> // std::istreambuf_iterator
|
||||
#include <pwd.h> // getpwuid, struct passwd
|
||||
#include <pwd.h> // getpwuid, passwd
|
||||
#include <string> // std::string (String)
|
||||
#include <string_view> // std::string_view (StringView)
|
||||
#include <sys/statvfs.h> // statvfs
|
||||
#include <sys/types.h> // uid_t
|
||||
#include <sys/utsname.h> // utsname, uname
|
||||
|
@ -97,7 +98,7 @@ namespace os {
|
|||
|
||||
fn GetShell() -> Result<String, DracError> {
|
||||
uid_t userId = getuid();
|
||||
struct passwd* pw = getpwuid(userId);
|
||||
passwd* pw = getpwuid(userId);
|
||||
|
||||
if (pw == nullptr)
|
||||
return Err(DracError(DracErrorCode::NotFound, std::format("User ID {} not found in /etc/passwd", userId)));
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue