1
Fork 0
mirror of https://github.com/RGBCube/ncc synced 2025-07-29 11:07:44 +00:00

rebuild: warn for non-matching hostname

This commit is contained in:
RGBCube 2025-05-15 21:16:03 +03:00
parent f3770d5ae4
commit f36ac3ac03
Signed by: RGBCube
SSH key fingerprint: SHA256:CzqbPcfwt+GxFYNnFVCqoN5Itn4YFrshg1TrnACpA5M

View file

@ -17,6 +17,10 @@ def main --wrapped [
...arguments # The arguments to pass to `nh {os,darwin} switch` and `nix` (separated by --). ...arguments # The arguments to pass to `nh {os,darwin} switch` and `nix` (separated by --).
]: nothing -> nothing { ]: nothing -> nothing {
let host = if ($host | is-not-empty) { 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 $host
} else if $remote { } else if $remote {
print $"(ansi red_bold)error:(ansi reset) hostname not specified for remote build" print $"(ansi red_bold)error:(ansi reset) hostname not specified for remote build"