Skip to content

Commit

Permalink
Barf when using a diverted store on macOS
Browse files Browse the repository at this point in the history
Fixes #1792.
  • Loading branch information
edolstra committed Jan 15, 2018
1 parent 53b5207 commit ba75c69
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions src/libstore/build.cc
Expand Up @@ -1810,8 +1810,13 @@ void DerivationGoal::startBuilder()
useChroot = !fixedOutput && get(drv->env, "__noChroot") != "1";
}

if (worker.store.storeDir != worker.store.realStoreDir)
useChroot = true;
if (worker.store.storeDir != worker.store.realStoreDir) {
#if __linux__
useChroot = true;
#else
throw Error("building using a diverted store is not supported on this platform");
#endif
}

/* If `build-users-group' is not empty, then we have to build as
one of the members of that group. */
Expand Down

0 comments on commit ba75c69

Please sign in to comment.