From: Daan De Meyer Date: Thu, 31 Oct 2024 11:00:52 +0000 (+0100) Subject: Show a proper error message if /etc/subuid or /etc/subgid doesn't exist. X-Git-Tag: v25~193^2~1 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=b311778f31cd7492e142c91eeaa22e7067114b08;p=thirdparty%2Fmkosi.git Show a proper error message if /etc/subuid or /etc/subgid doesn't exist. --- diff --git a/mkosi/user.py b/mkosi/user.py index 2fa7870ca..c74523e33 100644 --- a/mkosi/user.py +++ b/mkosi/user.py @@ -82,6 +82,9 @@ class INVOKING_USER: 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