From f36ac3ac038470b150c0d3eb28852ae90857d851 Mon Sep 17 00:00:00 2001 From: RGBCube Date: Thu, 15 May 2025 21:16:03 +0300 Subject: [PATCH] rebuild: warn for non-matching hostname --- rebuild.nu | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/rebuild.nu b/rebuild.nu index fb37c56..2576eb5 100755 --- a/rebuild.nu +++ b/rebuild.nu @@ -17,6 +17,10 @@ def main --wrapped [ ...arguments # The arguments to pass to `nh {os,darwin} switch` and `nix` (separated by --). ]: nothing -> nothing { let host = if ($host | is-not-empty) { + if $host != (hostname) { + print $"(ansi yellow_bold)warn:(ansi reset) building local configuration for hostname that does not match the local machine" + } + $host } else if $remote { print $"(ansi red_bold)error:(ansi reset) hostname not specified for remote build"