File otp_src_28.0-ex_doc_wrapper.patch of Package erlang
diff -Ndurp otp_src_28.0/make/ex_doc_wrapper.in otp_src_28.0-ex_doc_wrapper/make/ex_doc_wrapper.in
--- otp_src_28.0/make/ex_doc_wrapper.in 2025-05-20 14:19:37.000000000 +0300
+++ otp_src_28.0-ex_doc_wrapper/make/ex_doc_wrapper.in 2025-05-22 03:52:34.236958919 +0300
@@ -47,36 +47,4 @@ if [ -z "${EX_DOC}" ]; then
fi
fi
-## The below bash magic captures the output of stderr into OUTPUT while still printing
-## everything we get to stdout and stderr. This is done by:
-
-## 1. duplicating the stdout (1) and stderr (2) streams to fd 3 and 4 respectively.
-exec 3>&1 4>&2
-
-## Running the command where we redirect stderr to fd 1 and stdout to fd 3.
-## We then use tee on the stderr (which is now fd 1) to print that to fd 4
-OUTPUT="$( { escript@EXEEXT@ "${EX_DOC}" "${ARGS[@]}"; } 2>&1 1>&3 | tee /dev/fd/4 )"
-
-## Close fd 3 and 4
-exec 3>&- 4>&-
-
-## If EX_DOC_WARNINGS_AS_ERRORS is not explicitly turned on
-## and any .app file is missing, we turn off warnings as errors
-if [ "${EX_DOC_WARNINGS_AS_ERRORS}" != "true" ]; then
- for app in $ERL_TOP/lib/*/; do
- if [ ! -f $app/ebin/*.app ]; then
- EX_DOC_WARNINGS_AS_ERRORS=false
- fi
- done
-fi
-
-if [ "${EX_DOC_WARNINGS_AS_ERRORS}" != "false" ]; then
- if echo "${OUTPUT}" | grep "warning:" 1>/dev/null; then
- echo "ex_doc emitted warnings"
- ## Touch the config file in order to re-trigger make
- if [ -f "docs.exs" ]; then
- touch "docs.exs"
- fi
- exit 1;
- fi
-fi
+escript@EXEEXT@ "${EX_DOC}" "${ARGS[@]}"