From 48ec9e7ca01daeb083d45bde2d85a5aae58e7cdd Mon Sep 17 00:00:00 2001 From: Tom Bereknyei Date: Thu, 29 Aug 2024 06:00:06 -0400 Subject: [PATCH] feat: turn fatal error of missing user into warning fix: Update src/libstore/unix/user-lock.cc Co-authored-by: Robert Hensing fix: remove single-quotes --- src/libstore/unix/user-lock.cc | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/src/libstore/unix/user-lock.cc b/src/libstore/unix/user-lock.cc index 29f4b2cb3..af5aa20d1 100644 --- a/src/libstore/unix/user-lock.cc +++ b/src/libstore/unix/user-lock.cc @@ -74,8 +74,13 @@ struct SimpleUserLock : UserLock debug("trying user '%s'", i); struct passwd * pw = getpwnam(i.c_str()); - if (!pw) - throw Error("the user '%s' in the group '%s' does not exist", i, settings.buildUsersGroup); + if (!pw) { + printError("error: the user '%s' in the group '%s' does not exist", i, settings.buildUsersGroup); +#if __APPLE__ + printError("note: If you are using macOS 15.0 Sequoia or newer, you may need to run this script: https://github.com/NixOS/nix/blob/master/scripts/sequoia-nixbld-user-migration.sh"); +#endif + continue; + } auto fnUserLock = fmt("%s/userpool/%s", settings.nixStateDir,pw->pw_uid);