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.
This commit is contained in:
Arnout Engelen 2025-03-13 16:22:09 +01:00
parent e3e32b642a
commit 317689eefb
No known key found for this signature in database
GPG Key ID: 061107B0F74A6DAA

View File

@ -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)
'';
/**