aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorjade <lix@jade.fyi>2024-09-14 19:28:24 +0000
committerGerrit Code Review <gerrit@localhost>2024-09-14 19:28:24 +0000
commit5246cea6c8b30ad2fd4382b852ce445075e91a3e (patch)
tree575c6dab772d140e0bdb38da32f3b06a1d05e1eb
parent8f88590d13363fef6b6a4576697afeccf835b081 (diff)
parentb7fc37b0154b14d677f2d05b06b761373e2d44b6 (diff)
Merge "store: add a hint on how to fix Lix installs broken by macOS Sequoia" into main
-rw-r--r--src/libstore/lock.cc12
1 files changed, 10 insertions, 2 deletions
diff --git a/src/libstore/lock.cc b/src/libstore/lock.cc
index 05296757d..377499c0a 100644
--- a/src/libstore/lock.cc
+++ b/src/libstore/lock.cc
@@ -73,8 +73,16 @@ 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) {
+#ifdef __APPLE__
+#define APPLE_HINT "\n\nhint: this may be caused by an update to macOS Sequoia breaking existing Lix installations.\n" \
+ "See the macOS Sequoia page on the Lix wiki for detailed repair instructions: https://wiki.lix.systems/link/81"
+#else
+#define APPLE_HINT
+#endif
+ throw Error("the user '%s' in the group '%s' does not exist" APPLE_HINT, i, settings.buildUsersGroup);
+#undef APPLE_HINT
+ }
auto fnUserLock = fmt("%s/userpool/%s", settings.nixStateDir,pw->pw_uid);