From 317689eefb01c80fd17b295afc96a04faba3157b Mon Sep 17 00:00:00 2001 From: Arnout Engelen Date: Thu, 13 Mar 2025 16:22:09 +0100 Subject: [PATCH] nginx: output config on failed gixy check Sometimes the gixy output can be hard to trace back to the module configurations that were merged into that config. Also provide a hint that this can happen due to merging incompatible services on the same hostname. --- pkgs/build-support/writers/scripts.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkgs/build-support/writers/scripts.nix b/pkgs/build-support/writers/scripts.nix index 4450b79a8fa8..a1befd9aae6e 100644 --- a/pkgs/build-support/writers/scripts.nix +++ b/pkgs/build-support/writers/scripts.nix @@ -1107,7 +1107,7 @@ rec { '' # nginx-config-formatter has an error - https://github.com/1connect/nginx-config-formatter/issues/16 awk -f ${awkFormatNginx} "$textPath" | sed '/^\s*$/d' > $out - gixy $out + gixy $out || (echo "\n\nThis can be caused by combining multiple incompatible services on the same hostname.\n\nFull merged config:\n\n"; cat $out; exit 1) ''; /**