mirror of
https://github.com/NixOS/nix.git
synced 2025-11-15 15:02:42 +01:00
Factor out isRootUser function
This commit is contained in:
parent
eeecbb9c36
commit
e4d9b207c2
11 changed files with 30 additions and 15 deletions
|
|
@ -113,4 +113,9 @@ std::string expandTilde(std::string_view path)
|
|||
return std::string(path);
|
||||
}
|
||||
|
||||
|
||||
bool isRootUser() {
|
||||
return getuid() == 0;
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue