[
https://issues.apache.org/jira/browse/TIKA-4743?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=18085228#comment-18085228
]
ASF GitHub Bot commented on TIKA-4743:
--------------------------------------
Copilot commented on code in PR #2860:
URL: https://github.com/apache/tika/pull/2860#discussion_r3334465195
##########
docs/publish-docs.sh:
##########
@@ -61,6 +61,22 @@ if [[ ! -d target/site ]]; then
exit 1
fi
+# Run sed and replace $output atomically. The plain 'sed IN > OUT' form
+# truncates OUT before sed runs, so a missing input or sed failure leaves an
+# empty file behind; this writes to OUT.tmp first and only renames on success.
+# Important for PUBLISH_DIR/search-index.js, which persists across runs (a
+# corrupted one would stay corrupted until the next successful publish).
+sed_atomic() {
+ local script="$1" input="$2" output="$3"
+ if [[ ! -f "${input}" ]]; then
+ echo "${input} not found." >&2
+ echo "Re-run 'mvn package -pl docs' to regenerate it." >&2
+ exit 1
Review Comment:
The regeneration hint in this new error message suggests running `mvn
package -pl docs`, but this script runs from `docs/` (and earlier in the script
the build hint uses `cd .. && ./mvnw package -pl docs`). Using `mvn` directly
may fail for contributors relying on the Maven wrapper and/or from the `docs/`
directory; please align this message with the documented/earlier command.
> tika-4.0.0-alpha1 - documentation site
> --------------------------------------
>
> Key: TIKA-4743
> URL: https://issues.apache.org/jira/browse/TIKA-4743
> Project: Tika
> Issue Type: Bug
> Affects Versions: 4.0.0
> Reporter: Adrian Bird
> Priority: Minor
>
> A couple of comments about the [Apache Tika Documentation
> site|https://tika.apache.org/docs/4.0.0-SNAPSHOT/index.html].
> * I was expecting the menu items on the left to open and show lower level
> pages where they have a triangle, but they don't. This does make it tricky to
> navigate because you have to do it via the links on the pages themselves.
> * Search - trying to use the search feature pops up a small box with the
> text 'Loading search index...' (in white on the light gray background means
> it isn't really visible) and nothing happens i.e. no search results are
> displayed.
>
--
This message was sent by Atlassian Jira
(v8.20.10#820010)