Skip to content

Commit

Permalink
Show a proper error message if /etc/subuid or /etc/subgid doesn't exist.
Browse files Browse the repository at this point in the history
  • Loading branch information
DaanDeMeyer committed Oct 31, 2024
1 parent b3d1233 commit 903ca02
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions mkosi/user.py
Original file line number Diff line number Diff line change
Expand Up @@ -82,6 +82,9 @@ def chown(cls, path: Path) -> None:


def read_subrange(path: Path) -> int:
if not path.exists():
die(f"{path} does not exist, cannot allocate subuid/subgid user namespace")

uid = str(os.getuid())
try:
user = pwd.getpwuid(os.getuid()).pw_name
Expand Down

0 comments on commit 903ca02

Please sign in to comment.