Skip to content
  • Gábor Szeder's avatar
    ci: fix AsciiDoc/Asciidoctor stderr check in the documentation build job · 37fc8cb1
    Gábor Szeder authored and Junio C Hamano's avatar Junio C Hamano committed
    In 'ci/test-documentation.sh' we save the standard error of 'make
    doc', and, in an attempt to make sure that neither AsciiDoc nor
    Asciidoctor printed any warnings, we check the emptiness of the
    resulting file with '! test -s stderr.log'.  This check has never
    actually worked, because in our 'ci/*' build scripts we rely on 'set
    -e' aborting the build job when a command exits with error, and,
    unfortunately, the combination of the two doesn't work as intended.
    According to POSIX [1]:
    
      "The -e setting shall be ignored when executing [...] a pipeline
      beginning with the ! reserved word" [2]
    
    Watch and learn:
    
      $ echo unexpected >file
      $ ( set -e; ! test -s file ; echo "should not reach this" ) ; echo $?
      should not reach this
      0
    
    This is why we haven't noticed the warnings from Asciidoctor that were
    fixed in the first patches of this patch series, though some of them
    were already there in the build of v2.18.0-rc0 [3].
    
    Check the em...
    37fc8cb1