From 63e9e9df3767a9c77a44200b0f02e2c92a0d8917 Mon Sep 17 00:00:00 2001 From: Cole Helbling Date: Tue, 3 Jun 2025 08:38:04 -0700 Subject: [PATCH] fixup: only show "you can rerun" message if the derivation's platform is supported on this machine --- src/build-remote/build-remote.cc | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/build-remote/build-remote.cc b/src/build-remote/build-remote.cc index 49570d7cd..cd13e6670 100644 --- a/src/build-remote/build-remote.cc +++ b/src/build-remote/build-remote.cc @@ -332,8 +332,10 @@ connected: 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." + "The failed build directory was kept on the remote builder due to `--keep-failed`.%s", + (settings.thisSystem == drv.platform || settings.extraPlatforms.get().count(drv.platform) > 0) + ? " 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);