1
0
Fork 0
mirror of https://github.com/NixOS/nix synced 2025-07-07 01:51:47 +02:00

--keep-failed with remote builders will keep the failed build directory on that builder

This commit is contained in:
Cole Helbling 2025-06-02 14:28:43 -07:00
parent 2960d7adf5
commit 0712339912
No known key found for this signature in database
2 changed files with 9 additions and 1 deletions

View file

@ -329,8 +329,15 @@ connected:
drv.inputSrcs = store->parseStorePathSet(inputs);
optResult = sshStore->buildDerivation(*drvPath, (const BasicDerivation &) drv);
auto & result = *optResult;
if (!result.success())
if (!result.success()) {
if (settings.keepFailed) {
warn(
"The failed build directory was kept on the remote builder due to `--keep-failed`. "
"If the build's architecture matches your host, you can re-run the command with `--builders ''` to disable remote building for this invocation."
);
}
throw Error("build of '%s' on '%s' failed: %s", store->printStorePath(*drvPath), storeUri, result.errorMsg);
}
} else {
copyClosure(*store, *sshStore, StorePathSet {*drvPath}, NoRepair, NoCheckSigs, substitute);
auto res = sshStore->buildPathsWithResults({